diff options
author | paltherr <paltherr@epfl.ch> | 2003-09-09 14:46:46 +0000 |
---|---|---|
committer | paltherr <paltherr@epfl.ch> | 2003-09-09 14:46:46 +0000 |
commit | 151cca035b733f707a923f015c48147ef4077b50 (patch) | |
tree | d59056e30604c88d81cc67f03208e2eea4a46536 | |
parent | 13c7c02fbe60d476612f441937227b2df5ef5124 (diff) | |
download | scala-151cca035b733f707a923f015c48147ef4077b50.tar.gz scala-151cca035b733f707a923f015c48147ef4077b50.tar.bz2 scala-151cca035b733f707a923f015c48147ef4077b50.zip |
- The name ERROR is now both a type name and a ...
- The name ERROR is now both a type name and a term name
-rw-r--r-- | sources/scalac/util/Name.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sources/scalac/util/Name.java b/sources/scalac/util/Name.java index 988d0282b2..639e2b6bb8 100644 --- a/sources/scalac/util/Name.java +++ b/sources/scalac/util/Name.java @@ -142,6 +142,7 @@ public final class Name { /** is this name a term name? */ public boolean isTermName() { + if (this == ERROR) return true; int h = hashValue(names, index, len) & HASH_MASK; Name n = termHashtable[h]; while (n != null && n != this) @@ -152,6 +153,7 @@ public final class Name { /** is this name a type name? */ public boolean isTypeName() { + if (this == ERROR) return true; int h = hashValue(names, index, len) & HASH_MASK; Name n = typeHashtable[h]; while (n != null && n != this) @@ -162,6 +164,7 @@ public final class Name { /** create a term name corresponding to this name */ public Name toTermName() { + if (this == ERROR) return this; int h = hashValue(names, index, len) & HASH_MASK; Name n = termHashtable[h]; while (n != null && n.index != index) @@ -175,6 +178,7 @@ public final class Name { /** create a type name corresponding to this name */ public Name toTypeName() { + if (this == ERROR) return this; int h = hashValue(names, index, len) & HASH_MASK; Name n = typeHashtable[h]; while (n != null && n.index != index) |