From 4ce196d8152f75163edb362fcd21fb37631b7fde Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Fri, 5 Apr 2013 16:54:10 +0200 Subject: Made module class names end in '$'. If module classes have the same names as their companion classes there is the latent trap that TypeRefs refer to one or the other. To avoid cross-talk, module classes need to have a different name. Also, some fixes to baseType, isSubClass in SymDenotations. --- src/dotty/tools/dotc/core/pickling/ClassfileParser.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/dotty/tools/dotc/core/pickling/ClassfileParser.scala') diff --git a/src/dotty/tools/dotc/core/pickling/ClassfileParser.scala b/src/dotty/tools/dotc/core/pickling/ClassfileParser.scala index 4981a6f4e..ac0e86110 100644 --- a/src/dotty/tools/dotc/core/pickling/ClassfileParser.scala +++ b/src/dotty/tools/dotc/core/pickling/ClassfileParser.scala @@ -684,7 +684,7 @@ class ClassfileParser( innerClasses.get(externalName) match { case Some(entry) => - val outerName = entry.outerName.stripModuleSuffix + val outerName = entry.outerName.stripModuleClassSuffix val owner = classSymbol(outerName) val result = cctx.atPhaseNotLaterThanTyper { implicit ctx => getMember(owner, innerName.toTypeName) @@ -808,7 +808,7 @@ class ClassfileParser( val start = starts(index) if (in.buf(start).toInt != CONSTANT_CLASS) errorBadTag(start) val name = getExternalName(in.getChar(start + 1)) - if (name.isModuleName) c = cctx.requiredModule(name.stripModuleSuffix.asTermName) + if (name.isModuleClassName) c = cctx.requiredModule(name.stripModuleClassSuffix.asTermName) else c = classNameToSymbol(name) values(index) = c } -- cgit v1.2.3