Aladdin - Scala Bugtracking
[#669] project: compiler priority: low category: bug
submitter assigned to status date submitted
Sean Nikolay fixed 2006-07-21 07:38:03.0
subject resident compiler + annotations = crash
code
package util;
[serializable]
trait LinkedHashSet[A];
what happened
nsc> util/LinkedHashSet.scala

nsc> util/LinkedHashSet.scala
Exception in thread "main" java.lang.NullPointerException
        at scala.tools.nsc.transform.Erasure$Eraser.adaptMember(Erasure.scala:301)
        at scala.tools.nsc.transform.Erasure$Eraser.typed1(Erasure.scala:356)
        at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:1758)
        at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$58.apply(Typers.scala:1121)
        at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$58.apply(Typers.scala:1120)
        at scala.List.map(List.scala:652)
        at scala.tools.nsc.typechecker.Typers$Typer.attributes(Typers.scala:1120)
        at scala.tools.nsc.typechecker.Typers$Typer.typedClassDef(Typers.scala:624)
        at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:1432)
        at scala.tools.nsc.transform.Erasure$Eraser.typed1(Erasure.scala:356)
        at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:1758)
        at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:1785)
        at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$46.apply(Typers.scala:998)
        at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$46.apply(Typers.scala:988)
        at scala.List$.loop$0(List.scala:232)
        at scala.List$.mapConserve(List.scala:249)
        at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:988)
        at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:1428)
        at scala.tools.nsc.transform.Erasure$Eraser.typed1(Erasure.scala:356)
        at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:1758)
        at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:1785)
        at scala.tools.nsc.transform.Erasure$ErasureTransformer$$anonfun$21.apply(Erasure.scala:617)
        at scala.tools.nsc.transform.Erasure$ErasureTransformer$$anonfun$21.apply(Erasure.scala:614)
        at scala.tools.nsc.symtab.SymbolTable.atPhase(SymbolTable.scala:71)
        at scala.tools.nsc.transform.Erasure$ErasureTransformer.transform(Erasure.scala:614)
        at scala.tools.nsc.ast.Trees$Transformer.transformUnit(Trees.scala:1059)
        at scala.tools.nsc.transform.Transform$Phase.apply(Transform.scala:22)
        at scala.tools.nsc.Global$GlobalPhase.applyPhase(Global.scala:216)
        at scala.tools.nsc.Global$GlobalPhase$$anonfun$1.apply(Global.scala:205)
        at scala.tools.nsc.Global$GlobalPhase$$anonfun$1.apply(Global.scala:205)
        at scala.Iterator$class.foreach(Iterator.scala:304)
        at scala.collection.mutable.ListBuffer$$anon$0.foreach(ListBuffer.scala:216)
        at scala.tools.nsc.Global$GlobalPhase.run(Global.scala:205)
        at scala.tools.nsc.Global$Run.compileSources(Global.scala:467)
        at scala.tools.nsc.Global$Run.compile(Global.scala:531)
        at scala.tools.nsc.Main$$anonfun$0.apply(Main.scala:39)
        at scala.tools.nsc.Main$$anonfun$0.apply(Main.scala:36)
        at scala.tools.nsc.EvalLoop$class.loop(EvalLoop.scala:17)
        at scala.tools.nsc.Main$.loop(Main.scala:16)
        at scala.tools.nsc.EvalLoop$class.loop(EvalLoop.scala:18)
        at scala.tools.nsc.Main$.loop(Main.scala:16)
        at scala.tools.nsc.Main$.resident(Main.scala:36)
        at scala.tools.nsc.Main$.process(Main.scala:71)
        at scala.tools.nsc.Main$.main(Main.scala:98)
        at scala.tools.nsc.Main.main(Main.scala)
what expected
[back to overview]
Changes of this bug report
Martin  edited on  2006-07-24 18:22:08.0
The problem was a test in Typers.attributes which does not work in resident mode. I commented it out. Nik, can you review the fix and then close the bug?
Nikolay  edited on  2006-08-15 10:05:26.0
The crash seems completely unrelated to the (possible) issue described by Martin. The problem is wrong tree attribution (tree node with missing type). Reassigned to Martin.
Nikolay  edited on  2006-08-15 11:40:59.0
Martin was right after all. Fixed in rev 8382.