Aladdin - Scala Bugtracking
[#818] project: compiler priority: medium category: bug
submitter assigned to status date submitted
Martin Iulian not repro 2006-11-11 18:14:34.0
subject broken classfile reported when reading inner classes
code
do a clean build.

Then do

nsc scala/src/compiler/scala/tools/nsc/transform/Erasure.scala -debug

what happened
After some debug output:
scala.tools.nsc.FatalError: class scala.tools.nsc.ast.Trees$Tree$$anonfun$0 not found.
	at scala.tools.nsc.symtab.Definitions$definitions$.getModuleOrClass(Definitions.scala:280)
	at scala.tools.nsc.symtab.Definitions$definitions$.getClass(Definitions.scala:256)
	at scala.tools.nsc.symtab.classfile.ClassfileParser$ConstantPool.getClassSymbol(ClassfileParser.scala:175)
	at scala.tools.nsc.symtab.classfile.ClassfileParser$$anonfun$11.apply(ClassfileParser.scala:703)
	at scala.tools.nsc.symtab.classfile.ClassfileParser$$anonfun$11.apply(ClassfileParser.scala:693)
	at scala.Iterator$class.foreach(Iterator.scala:319)
	at scala.Iterator$$anon$2.foreach(Iterator.scala:104)
	at scala.tools.nsc.symtab.classfile.ClassfileParser.parseInnerClasses$0(ClassfileParser.scala:693)
	at scala.tools.nsc.symtab.classfile.ClassfileParser.parseAttribute$0(ClassfileParser.scala:616)
	at scala.tools.nsc.symtab.classfile.ClassfileParser$$anonfun$12.apply(ClassfileParser.scala:715)
	at scala.tools.nsc.symtab.classfile.ClassfileParser$$anonfun$12.apply(ClassfileParser.scala:715)
	at scala.Iterator$class.foreach(Iterator.scala:319)
	at scala.Iterator$$anon$2.foreach(Iterator.scala:104)
	at scala.tools.nsc.symtab.classfile.ClassfileParser.parseAttributes(ClassfileParser.scala:715)
	at scala.tools.nsc.symtab.classfile.ClassfileParser.parseClass(ClassfileParser.scala:362)
	at scala.tools.nsc.symtab.classfile.ClassfileParser.parse(ClassfileParser.scala:89)
	at scala.tools.nsc.symtab.SymbolLoaders$ClassfileLoader.doComplete(SymbolLoaders.scala:191)
	at scala.tools.nsc.symtab.SymbolLoaders$SymbolLoader.complete(SymbolLoaders.scala:56)
	at scala.tools.nsc.symtab.Symbols$Symbol.info(Symbols.scala:395)
	at scala.tools.nsc.symtab.Symbols$Symbol.closureLength$0(Symbols.scala:523)
	at scala.tools.nsc.symtab.Symbols$Symbol.isLess(Symbols.scala:526)
	at scala.tools.nsc.symtab.Types$Type.closurePos(Types.scala:332)
	at scala.tools.nsc.symtab.Types$CompoundType.baseType(Types.scala:796)
	at scala.tools.nsc.symtab.Types$TypeRef.baseType(Types.scala:929)
	at scala.tools.nsc.symtab.Types$class.isSubType0(Types.scala:1884)
	at scala.tools.nsc.symtab.SymbolTable.isSubType0(SymbolTable.scala:10)
	at scala.tools.nsc.symtab.Types$class.isSubType(Types.scala:1833)
	at scala.tools.nsc.symtab.SymbolTable.isSubType(SymbolTable.scala:10)
	at scala.tools.nsc.symtab.Types$Type.$less$colon$less(Types.scala:266)
	at scala.tools.nsc.backend.icode.TypeKinds$REFERENCE.$less$colon$less(TypeKinds.scala:243)
	at scala.tools.nsc.backend.icode.GenICode$ICodePhase.adapt(GenICode.scala:942)
	at scala.tools.nsc.backend.icode.GenICode$ICodePhase.scala$tools$nsc$backend$icode$GenICode$ICodePhase$$genLoad\
(GenICode.scala:936)
	at scala.tools.nsc.backend.icode.GenICode$ICodePhase.genLoadArguments(GenICode.scala:1015)
what expected Succesful compilation. The problem might be that the SymbolLoader does not treat classes with $anon in their name as loadable (see isValid).
[back to overview]
Changes of this bug report
Iulian  edited on  2006-11-13 11:42:05.0
I can't reproduce this. I don't think it's the symbol loader at fault here, as inner classes should not be parsed when loading a Scala class (the pickle information has everything we need).
Burak  edited on  2006-11-20 18:01:17.0
fixed formatting