Aladdin - Scala Bugtracking
[#817] project: compiler priority: high category: bug
submitter assigned to status date submitted
Sean Martin fixed 2006-11-11 13:54:18.0
subject traits + object types + mixin compositions = crash in backend (latest checkin only).
code
abstract class NewScalaTestYYY { 
  abstract class Dir;
  object PREV extends Dir;
  trait BeginImpl { 
    def initDir : PREV.type = null;
  }
  class Begin extends BeginImpl;
}
what happened
sean-mcdirmid:~/workspace/lampion/src mcdirmid$ ../../scala/build/quick/bin/scalac -d ../bin -sourcepath . \
lampion/scalax/NewScalaTestYYY.scala
Exception in thread "main" java.lang.AssertionError: assertion failed: REFERENCE to NoSymbol not allowed!
	at scala.Predef$.assert(Predef.scala:100)
	at scala.tools.nsc.backend.icode.TypeKinds$REFERENCE.(TypeKinds.scala:218)
	at scala.tools.nsc.backend.icode.TypeKinds$class.toTypeKind(TypeKinds.scala:347)
	at scala.tools.nsc.backend.icode.ICodes.toTypeKind(ICodes.scala:18)
	at scala.tools.nsc.backend.icode.GenICode$ICodePhase.gen(GenICode.scala:102)
	at scala.tools.nsc.backend.icode.GenICode$ICodePhase$$anonfun$0.apply(GenICode.scala:68)
	at scala.tools.nsc.backend.icode.GenICode$ICodePhase$$anonfun$0.apply(GenICode.scala:67)
	at scala.List.foreach(List.scala:692)
	at scala.tools.nsc.backend.icode.GenICode$ICodePhase.gen(GenICode.scala:67)
	at scala.tools.nsc.backend.icode.GenICode$ICodePhase.gen(GenICode.scala:129)
	at scala.tools.nsc.backend.icode.GenICode$ICodePhase.gen(GenICode.scala:86)
	at scala.tools.nsc.backend.icode.GenICode$ICodePhase$$anonfun$0.apply(GenICode.scala:68)
	at scala.tools.nsc.backend.icode.GenICode$ICodePhase$$anonfun$0.apply(GenICode.scala:67)
	at scala.List.foreach(List.scala:692)
	at scala.tools.nsc.backend.icode.GenICode$ICodePhase.gen(GenICode.scala:67)
	at scala.tools.nsc.backend.icode.GenICode$ICodePhase.gen(GenICode.scala:79)
	at scala.tools.nsc.backend.icode.GenICode$ICodePhase$$anonfun$0.apply(GenICode.scala:68)
	at scala.tools.nsc.backend.icode.GenICode$ICodePhase$$anonfun$0.apply(GenICode.scala:67)
	at scala.List.foreach(List.scala:692)
	at scala.tools.nsc.backend.icode.GenICode$ICodePhase.gen(GenICode.scala:67)
	at scala.tools.nsc.backend.icode.GenICode$ICodePhase.gen(GenICode.scala:79)
	at scala.tools.nsc.backend.icode.GenICode$ICodePhase.gen(GenICode.scala:63)
	at scala.tools.nsc.backend.icode.GenICode$ICodePhase.apply(GenICode.scala:59)
	at scala.tools.nsc.Global$GlobalPhase.applyPhase(Global.scala:219)
	at scala.tools.nsc.Global$GlobalPhase$$anonfun$1.apply(Global.scala:208)
	at scala.tools.nsc.Global$GlobalPhase$$anonfun$1.apply(Global.scala:208)
	at scala.Iterator$class.foreach(Iterator.scala:319)
	at scala.collection.mutable.ListBuffer$$anon$0.foreach(ListBuffer.scala:244)
	at scala.tools.nsc.Global$GlobalPhase.run(Global.scala:208)
	at scala.tools.nsc.backend.icode.GenICode$ICodePhase.run(GenICode.scala:53)
	at scala.tools.nsc.Global$Run.compileSources(Global.scala:473)
	at scala.tools.nsc.Global$Run.compile(Global.scala:542)
	at scala.tools.nsc.Main$.process(Main.scala:74)
	at scala.tools.nsc.Main$.main(Main.scala:96)
	at scala.tools.nsc.Main.main(Main.scala)
sean-mcdirmid:~/workspace/lampion/src mcdirmid$
This is a newly created bug I think, or my code would have crashed long ago.
what expected
[back to overview]
Changes of this bug report
Martin  edited on  2006-11-11 19:39:52.0
Bug was caused by fix to bug809. I start to despair again of this mixin thing!