summaryrefslogtreecommitdiff
path: root/sources/scalac
diff options
context:
space:
mode:
authormihaylov <mihaylov@epfl.ch>2004-07-20 16:41:17 +0000
committermihaylov <mihaylov@epfl.ch>2004-07-20 16:41:17 +0000
commitda852d8ff2f8e0a86a0eb7fe2fdb0f12ec7bbc12 (patch)
tree290db0105862c86dbabcfc115863b5b6a5c6b58e /sources/scalac
parent90d52624b93ef1102421a84a9971bd91640cc5ef (diff)
downloadscala-da852d8ff2f8e0a86a0eb7fe2fdb0f12ec7bbc12.tar.gz
scala-da852d8ff2f8e0a86a0eb7fe2fdb0f12ec7bbc12.tar.bz2
scala-da852d8ff2f8e0a86a0eb7fe2fdb0f12ec7bbc12.zip
- Hard-coded the symbols of java.lang.Object an...
- Hard-coded the symbols of java.lang.Object and java.lang.String
Diffstat (limited to 'sources/scalac')
-rw-r--r--sources/scalac/symtab/classfile/Signatures.java20
1 files changed, 17 insertions, 3 deletions
diff --git a/sources/scalac/symtab/classfile/Signatures.java b/sources/scalac/symtab/classfile/Signatures.java
index 3ac965ab03..408a3e9384 100644
--- a/sources/scalac/symtab/classfile/Signatures.java
+++ b/sources/scalac/symtab/classfile/Signatures.java
@@ -14,7 +14,9 @@ import scalac.symtab.Symbol;
import scalac.symtab.Type;
import scalac.util.AbstractFileReader;
import scalac.util.Name;
+import scalac.util.Names;
import scalac.util.SourceRepresentation;
+import scalac.util.Debug;
/** This class implements the parsing of class file signatures. */
public class Signatures {
@@ -91,11 +93,23 @@ public class Signatures {
owner = module.moduleClass();
start = current + 1;
}
- Name name = Name.fromAscii(in.buf, start, current-start).toTypeName();
- Symbol clasz = owner.members().lookup(name);
+
+ Symbol clasz = null;
+ Name name = Name.fromAscii(in.buf, start, current-start);
+ if (owner == global.definitions.JAVALANG.moduleClass()) {
+ if (name == Names.String)
+ clasz = global.definitions.STRING_CLASS;
+ else if (name == Names.Object)
+ clasz = global.definitions.OBJECT_CLASS;
+ }
+ if (clasz == null) {
+ name = name.toTypeName();
+ clasz = owner.members().lookup(name);
+ }
+
if (!clasz.isClass()) {
Symbol symbol = owner.newErrorClass(name);
- error("could not find class " + symbol.staticType());
+ error("could not find class " + symbol.staticType() + "(found " + Debug.show(clasz) + ")");
if (clasz.isNone()) owner.members().enterNoHide(symbol);
clasz = symbol;
}