Aladdin - Scala Bugtracking
[#867] project: compiler priority: low category: bug
submitter assigned to status date submitted
Sean Martin fixed 2006-12-15 14:37:07.0
subject fun stabalize fun crash
code
package test;
import scala.collection.mutable._;
trait Test {
  def foo(tpe : Type) {
    for (val rule <- tpe.rules) {
      for (val tpe0 <- rule._2(xxx)) {}
    }
  }
  type NonEmptyType;
  type RuleScope;
  type Type <: TypeImpl;
  trait TypeImpl {
    object rules extends HashMap[NonEmptyType,HashMap[RuleScope,RuleInfo]];
    class RuleInfo;
  }
}
what happened
Exception in thread "main" java.lang.AssertionError: assertion failed
	at scala.Predef$.assert(Predef.scala:76)
	at scala.tools.nsc.typechecker.Typers$Typer.stabilizeFun(Typers.scala:457)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:2076)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:2231)
	at scala.tools.nsc.typechecker.Typers$Typer.typedQualifier(Typers.scala:2284)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:2144)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:2231)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:2075)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:2231)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:2275)
	at scala.tools.nsc.typechecker.Typers$Typer.typedFunction(Typers.scala:1223)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:1948)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:2231)
	at scala.tools.nsc.typechecker.Typers$Typer.typedArg(Typers.scala:1294)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$49.apply(Typers.scala:1298)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$49.apply(Typers.scala:1298)
	at scala.List$.loop$0(List.scala:244)
	at scala.List$.mapConserve(List.scala:261)
	at scala.tools.nsc.typechecker.Typers$Typer.typedArgs(Typers.scala:1298)
	at scala.tools.nsc.typechecker.Typers$Typer.tryTypedArgs$0(Typers.scala:1556)
	at scala.tools.nsc.typechecker.Typers$Typer.tryTypedApply$0(Typers.scala:1589)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:2084)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:2231)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:2275)
	at scala.tools.nsc.typechecker.Typers$Typer.transformedOrTyped(Typers.scala:2314)
	at scala.tools.nsc.typechecker.Typers$Typer.typedDefDef(Typers.scala:1059)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:1863)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:2231)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:2264)
	at scala.tools.nsc.typechecker.Typers$Typer.typedStat$0(Typers.scala:1267)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$48.apply(Typers.scala:1288)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$48.apply(Typers.scala:1288)
	at scala.List$.loop$0(List.scala:244)
	at scala.List$.mapConserve(List.scala:261)
	at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:1288)
	at scala.tools.nsc.typechecker.Typers$Typer.typedTemplate(Typers.scala:911)
	at scala.tools.nsc.typechecker.Typers$Typer.typedClassDef(Typers.scala:816)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:1854)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:2231)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:2264)
	at scala.tools.nsc.typechecker.Typers$Typer.typedStat$0(Typers.scala:1267)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$48.apply(Typers.scala:1288)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$48.apply(Typers.scala:1288)
	at scala.List$.loop$0(List.scala:244)
	at scala.List$.mapConserve(List.scala:261)
	at scala.List$.loop$0(List.scala:248)
	at scala.List$.mapConserve(List.scala:261)
	at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:1288)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:1850)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:2231)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:2264)
	at scala.tools.nsc.typechecker.Analyzer$typerFactory$$anon$1.apply(Analyzer.scala:38)
	at scala.tools.nsc.Global$GlobalPhase.applyPhase(Global.scala:220)
	at scala.tools.nsc.Global$GlobalPhase$$anonfun$1.apply(Global.scala:209)
	at scala.tools.nsc.Global$GlobalPhase$$anonfun$1.apply(Global.scala:209)
	at scala.Iterator$class.foreach(Iterator.scala:341)
	at scala.collection.mutable.ListBuffer$$anon$0.foreach(ListBuffer.scala:244)
	at scala.tools.nsc.Global$GlobalPhase.run(Global.scala:209)
	at scala.tools.nsc.Global$Run.compileSources(Global.scala:474)
	at scala.tools.nsc.Global$Run.compile(Global.scala:545)
	at scala.tools.nsc.Main$.process(Main.scala:58)
	at scala.tools.nsc.Main$.main(Main.scala:80)
	at scala.tools.nsc.Main.main(Main.scala)
what expected
[back to overview]
Changes of this bug report
Martin  edited on  2006-12-22 13:03:57.0
Burak, can you see what is going on here? It seems HashMap now inherits from Tuple2, but ScalaDoc does not show any of this.
Martin  edited on  2006-12-22 14:50:39.0
I was blind; Tuple2 had nothing to do with it.