From 151cca035b733f707a923f015c48147ef4077b50 Mon Sep 17 00:00:00 2001 From: paltherr Date: Tue, 9 Sep 2003 14:46:46 +0000 Subject: - The name ERROR is now both a type name and a ... - The name ERROR is now both a type name and a term name --- sources/scalac/util/Name.java | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'sources/scalac/util/Name.java') 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) -- cgit v1.2.3