summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala7
-rw-r--r--src/compiler/scala/tools/nsc/transform/AddInterfaces.scala10
2 files changed, 14 insertions, 3 deletions
diff --git a/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala b/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala
index 811bb6ee05..5e0fcb4bdc 100644
--- a/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala
+++ b/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala
@@ -1208,7 +1208,12 @@ abstract class ClassfileParser {
atPhase(currentRun.typerPhase)(getMember(sym, innerName.toTypeName))
else
getMember(sym, innerName.toTypeName)
- assert(s ne NoSymbol, sym + "." + innerName + " linkedModule: " + sym.companionModule + sym.companionModule.info.members)
+
+ assert(s ne NoSymbol,
+ "" + ((externalName, outerName, innerName, sym.fullLocationString)) + " / " +
+ " while parsing " + ((in.file, busy)) +
+ sym + "." + innerName + " linkedModule: " + sym.companionModule + sym.companionModule.info.members
+ )
s
case None =>
diff --git a/src/compiler/scala/tools/nsc/transform/AddInterfaces.scala b/src/compiler/scala/tools/nsc/transform/AddInterfaces.scala
index 1c41e68532..b4e1956cf4 100644
--- a/src/compiler/scala/tools/nsc/transform/AddInterfaces.scala
+++ b/src/compiler/scala/tools/nsc/transform/AddInterfaces.scala
@@ -84,8 +84,14 @@ abstract class AddInterfaces extends InfoTransform {
atPhase(implClassPhase) {
log("%s.implClass == %s".format(iface, iface.implClass))
val implName = nme.implClassName(iface.name)
- var impl = if (iface.owner.isClass) iface.owner.info.decl(implName) else NoSymbol
- impl.info
+ var impl = if (iface.owner.isClass) iface.owner.info.decl(implName) else NoSymbol
+
+ // !!! Why does forcing the impl's info here lead to a crash?
+ // See test case pos/trait-force-info.scala for a minimization.
+ // It crashes like this:
+ //
+ // [log lazyvals] trait ContextTrees.implClass == class ContextTrees$class
+ // error: java.lang.AssertionError: assertion failed: (scala.tools.nsc.typechecker.Contexts$NoContext$,scala.tools.nsc.typechecker.Contexts,NoContext$,trait Contexts in package typechecker) / while parsing (/scala/trunk/build/pack/lib/scala-compiler.jar(scala/tools/nsc/interactive/ContextTrees$class.class),Some(class ContextTrees$class))trait Contexts.NoContext$ linkedModule: <none>List()
val originalImpl = impl
val originalImplString = originalImpl.hasFlagsToString(-1L)