Aladdin - Scala Bugtracking
[#1228] project: compiler priority: low category: bug
submitter assigned to status date submitted
Nikolay Martin open 2007-07-19 12:27:43.0
subject [contrib #703] assertion failed in compiler
code
trait ** [T,S]
trait B[T]
trait A extends (B[Int] with (Int ** Int))
what happened
Exception in thread "main" java.lang.AssertionError: assertion failed: Int
        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$$anonfun$29.apply(Trees.scala:1302)
        at scala.tools.nsc.ast.Trees$Transformer$$anonfun$29.apply(Trees.scala:1302)
        at scala.List$.loop$0(List.scala:243)
        at scala.List$.mapConserve(List.scala:260)
        at scala.tools.nsc.ast.Trees$Transformer.transformTrees(Trees.scala:1302)
        at scala.tools.nsc.ast.Trees$Transformer.transform(Trees.scala:1296)
        at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transform(RefChecks.scala:770)
        at scala.tools.nsc.ast.Trees$Transformer$$anonfun$29.apply(Trees.scala:1302)
        at scala.tools.nsc.ast.Trees$Transformer$$anonfun$29.apply(Trees.scala:1302)
        at scala.List$.loop$0(List.scala:243)
        at scala.List$.mapConserve(List.scala:260)
        at scala.tools.nsc.ast.Trees$Transformer.transformTrees(Trees.scala:1302)
        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.transform(Trees.scala:1294)
        at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transform(RefChecks.scala:770)
        at scala.tools.nsc.ast.Trees$Transformer$$anonfun$29.apply(Trees.scala:1302)
        at scala.tools.nsc.ast.Trees$Transformer$$anonfun$29.apply(Trees.scala:1302)
        at scala.List$.loop$0(List.scala:243)
        at scala.List$.mapConserve(List.scala:260)
        at scala.tools.nsc.ast.Trees$Transformer.transformTrees(Trees.scala:1302)
        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:633)
        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:986)
        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:245)
        at scala.tools.nsc.Global$GlobalPhase$$anonfun$2.apply(Global.scala:234)
        at scala.tools.nsc.Global$GlobalPhase$$anonfun$2.apply(Global.scala:234)
        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:234)
        at scala.tools.nsc.Global$Run.compileSources(Global.scala:502)
        at scala.tools.nsc.Global$Run.compile(Global.scala:580)
        at scala.tools.nsc.Main$.process(Main.scala:61)
        at scala.tools.nsc.Main$.main(Main.scala:81)
        at scala.tools.nsc.Main.main(Main.scala)
what expected
[back to overview]
Changes of this bug report
Nikolay  edited on  2007-07-19 12:29:17.0
The ** name is not signifficant. Replacing it with X causes the same crash
Martin  edited on  2007-07-19 13:50:19.0
The problem is the outer parentheses after the extends.