diff options
author | mihaylov <mihaylov@epfl.ch> | 2005-04-13 16:45:13 +0000 |
---|---|---|
committer | mihaylov <mihaylov@epfl.ch> | 2005-04-13 16:45:13 +0000 |
commit | 061a14c274eca558d490241b994ca3b780794eab (patch) | |
tree | d88dfe75c54de2dbd6fc313ba3c137008bf1b7c7 /sources | |
parent | eff6111eea4462987ebfe25b70f7a4bceaa0bad1 (diff) | |
download | scala-061a14c274eca558d490241b994ca3b780794eab.tar.gz scala-061a14c274eca558d490241b994ca3b780794eab.tar.bz2 scala-061a14c274eca558d490241b994ca3b780794eab.zip |
Fix import of deeply nested classes.
Diffstat (limited to 'sources')
-rw-r--r-- | sources/scalac/symtab/classfile/CLRClassParser.java | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/sources/scalac/symtab/classfile/CLRClassParser.java b/sources/scalac/symtab/classfile/CLRClassParser.java index 110486448c..1c19932c92 100644 --- a/sources/scalac/symtab/classfile/CLRClassParser.java +++ b/sources/scalac/symtab/classfile/CLRClassParser.java @@ -92,22 +92,12 @@ public class CLRClassParser extends SymbolLoader { if (ntype.IsNestedPrivate() || ntype.IsNestedAssembly() || ntype.IsNestedFamANDAssem()) continue; - int j = ntype.FullName.lastIndexOf('.'); - String n = (j < 0 ? ntype.FullName : ntype.FullName.substring(j + 1)) - .replace('+', '#'); - Name classname = Name.fromString(n).toTypeName(); - Name aliasname = Name.fromString(ntype.Name).toTypeName(); - // put the class at the level of its outermost class - // the owner of a class is always its most specific package + Name classname = Name.fromString(ntype.Name).toTypeName(); CLRClassParser loader = new CLRClassParser(global, ntype); SymbolOrigin origin = SymbolOrigin.CLRAssembly(ntype.Assembly()); - Symbol nclazz = clazz.owner().newLoadedClass - (JAVA, classname, loader, null, origin); + Symbol nclazz = staticsClass.newLoadedClass + (JAVA, classname, loader, statics, origin); clrTypes.map(nclazz, ntype); - // create an alias in the module of the outer class - Symbol alias = staticsClass.newTypeAlias(Position.NOPOS, - translateAttributes(ntype), aliasname, make.classType(nclazz)); - statics.enterNoHide(alias); } FieldInfo[] fields = type.getFields(); |