Aladdin - Scala Bugtracking
[#1157] project: compiler priority: low category: bug
submitter assigned to status date submitted
Nikolay Martin fixed 2007-05-30 13:31:06.0
subject [contrib #585] compiler crash when accessing with type designator
code
object T {
   trait A { type m = AI; class AI { val v = "AI" }}
   val v = new A{}
   val u = new v.type#m
}
what happened
scalac -version
Scala compiler version 2.5.0.11833.20070527-122429 -- (c) 2002-2007 LAMP/EPFL

scalac -d target bug.scala
Exception in thread "main" java.lang.AssertionError: assertion failed: v
        at scala.Predef$.assert(Predef.scala:90)
        at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transform(RefChecks.scala:754)
        at scala.tools.nsc.ast.Trees$Transformer.transform(Trees.scala:1290)
        at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transform(RefChecks.scala:770)
        at scala.tools.nsc.ast.Trees$Transformer.transform(Trees.scala:1292)
        at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transform(RefChecks.scala:770)
        at scala.tools.nsc.ast.Trees$Transformer.transform(Trees.scala:1266)
        at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transform(RefChecks.scala:770)
        at scala.tools.nsc.ast.Trees$Transformer.transform(Trees.scala:1280)
        at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transform(RefChecks.scala:770)
        at scala.tools.nsc.ast.Trees$Transformer.transform(Trees.scala:1272)
        at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transform(RefChecks.scala:770)
        at scala.tools.nsc.ast.Trees$Transformer$$anonfun$24.apply(Trees.scala:1208)
        at scala.tools.nsc.ast.Trees$Transformer$$anonfun$24.apply(Trees.scala:1208)
        at scala.tools.nsc.ast.Trees$Transformer.atOwner(Trees.scala:1326)
        at scala.tools.nsc.ast.Trees$Transformer.transform(Trees.scala:1207)
        at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transform(RefChecks.scala:770)
        at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transformStat(RefChecks.scala:622)
        at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer$$anonfun$10.apply(RefChecks.scala:562)
        at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer$$anonfun$10.apply(RefChecks.scala:562)
        at scala.List.flatMap(List.scala:974)
        at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transformStats(RefChecks.scala:562)
        at scala.tools.nsc.ast.Trees$Transformer.transform(Trees.scala:1232)
        at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transform(RefChecks.scala:770)
        at scala.tools.nsc.ast.Trees$Transformer.transformTemplate(Trees.scala:1304)
        at scala.tools.nsc.ast.Trees$Transformer$$anonfun$22.apply(Trees.scala:1200)
        at scala.tools.nsc.ast.Trees$Transformer$$anonfun$22.apply(Trees.scala:1200)
        at scala.tools.nsc.ast.Trees$Transformer.atOwner(Trees.scala:1326)
        at scala.tools.nsc.ast.Trees$Transformer.transform(Trees.scala:1199)
        at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transform(RefChecks.scala:770)
        at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transformStat(RefChecks.scala:574)
        at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer$$anonfun$10.apply(RefChecks.scala:562)
        at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer$$anonfun$10.apply(RefChecks.scala:562)
        at scala.List.flatMap(List.scala:974)
        at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transformStats(RefChecks.scala:562)
        at scala.tools.nsc.ast.Trees$Transformer$$anonfun$21.apply(Trees.scala:1196)
        at scala.tools.nsc.ast.Trees$Transformer$$anonfun$21.apply(Trees.scala:1196)
        at scala.tools.nsc.ast.Trees$Transformer.atOwner(Trees.scala:1326)
        at scala.tools.nsc.ast.Trees$Transformer.transform(Trees.scala:1195)
        at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transform(RefChecks.scala:770)
        at scala.tools.nsc.ast.Trees$Transformer.transformUnit(Trees.scala:1321)
        at scala.tools.nsc.transform.Transform$Phase.apply(Transform.scala:30)
        at scala.tools.nsc.Global$GlobalPhase.applyPhase(Global.scala:241)
        at scala.tools.nsc.Global$GlobalPhase$$anonfun$2.apply(Global.scala:230)
        at scala.tools.nsc.Global$GlobalPhase$$anonfun$2.apply(Global.scala:230)
        at scala.Iterator$class.foreach(Iterator.scala:364)
        at scala.collection.mutable.ListBuffer$$anon$0.foreach(ListBuffer.scala:245)
        at scala.tools.nsc.Global$GlobalPhase.run(Global.scala:230)
        at scala.tools.nsc.Global$Run.compileSources(Global.scala:498)
        at scala.tools.nsc.Global$Run.compile(Global.scala:572)
        at scala.tools.nsc.Main$.process(Main.scala:57)
        at scala.tools.nsc.Main$.main(Main.scala:77)
        at scala.tools.nsc.Main.main(Main.scala)
what expected don't crash
[back to overview]
Changes of this bug report
Nikolay  edited on  2007-05-30 13:31:35.0
Martin  edited on  2007-06-01 17:59:02.0