Aladdin - Scala Bugtracking
[#865] project: compiler priority: low category: bug
submitter assigned to status date submitted
Sean Martin fixed 2006-12-11 12:48:25.0
subject Nested parametric traits + trait name overloading = flatten crash.
code
package test;
trait Test {
  trait HasValue[Container] {
    trait ValueImpl; 
  }
  trait HasObject[Container] extends HasValue[Container] {
    trait ValueImpl; 
  }
}
what happened
sean-mcdirmid:~/workspace/test02/src mcdirmid$ ../../scala.compare/build/quick/bin/scalac -d . -sourcepath \
. test/Test.scala
Exception in thread "main" java.lang.AssertionError: assertion failed
	at scala.Predef$.assert(Predef.scala:98)
	at scala.tools.nsc.transform.Flatten$$anon$0.apply(Flatten.scala:37)
	at scala.tools.nsc.transform.Flatten$$anon$0.apply(Flatten.scala:34)
	at scala.tools.nsc.transform.Flatten$Flattener.postTransform(Flatten.scala:100)
	at scala.tools.nsc.transform.Flatten$Flattener.transform(Flatten.scala:82)
	at scala.tools.nsc.ast.Trees$Transformer$$anonfun$24.apply(Trees.scala:1169)
	at scala.tools.nsc.ast.Trees$Transformer$$anonfun$24.apply(Trees.scala:1169)
	at scala.List$.loop$0(List.scala:244)
	at scala.List$.mapConserve(List.scala:261)
	at scala.tools.nsc.ast.Trees$Transformer.transformTrees(Trees.scala:1169)
	at scala.tools.nsc.ast.Trees$Transformer.transform(Trees.scala:1103)
	at scala.tools.nsc.transform.Flatten$Flattener.transform(Flatten.scala:82)
	at scala.tools.nsc.ast.Trees$Transformer.transformTemplate(Trees.scala:1171)
	at scala.tools.nsc.ast.Trees$Transformer$$anonfun$17.apply(Trees.scala:1071)
	at scala.tools.nsc.ast.Trees$Transformer$$anonfun$17.apply(Trees.scala:1070)
	at scala.tools.nsc.ast.Trees$Transformer.atOwner(Trees.scala:1191)
	at scala.tools.nsc.ast.Trees$Transformer.transform(Trees.scala:1069)
	at scala.tools.nsc.transform.Flatten$Flattener.transform(Flatten.scala:82)
	at scala.tools.nsc.ast.Trees$Transformer$$anonfun$30.apply(Trees.scala:1185)
	at scala.tools.nsc.ast.Trees$Transformer$$anonfun$30.apply(Trees.scala:1183)
	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.List$.loop$0(List.scala:248)
	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.ast.Trees$Transformer.transformStats(Trees.scala:1183)
	at scala.tools.nsc.transform.Flatten$Flattener.transformStats(Flatten.scala:105)
	at scala.tools.nsc.ast.Trees$Transformer.transform(Trees.scala:1103)
	at scala.tools.nsc.transform.Flatten$Flattener.transform(Flatten.scala:82)
	at scala.tools.nsc.ast.Trees$Transformer.transformTemplate(Trees.scala:1171)
	at scala.tools.nsc.ast.Trees$Transformer$$anonfun$17.apply(Trees.scala:1071)
	at scala.tools.nsc.ast.Trees$Transformer$$anonfun$17.apply(Trees.scala:1070)
	at scala.tools.nsc.ast.Trees$Transformer.atOwner(Trees.scala:1191)
	at scala.tools.nsc.ast.Trees$Transformer.transform(Trees.scala:1069)
	at scala.tools.nsc.transform.Flatten$Flattener.transform(Flatten.scala:82)
	at scala.tools.nsc.ast.Trees$Transformer$$anonfun$30.apply(Trees.scala:1185)
	at scala.tools.nsc.ast.Trees$Transformer$$anonfun$30.apply(Trees.scala:1183)
	at scala.List$.loop$0(List.scala:244)
	at scala.List$.mapConserve(List.scala:261)
	at scala.tools.nsc.ast.Trees$Transformer.transformStats(Trees.scala:1183)
	at scala.tools.nsc.transform.Flatten$Flattener.transformStats(Flatten.scala:105)
	at scala.tools.nsc.ast.Trees$Transformer$$anonfun$16.apply(Trees.scala:1066)
	at scala.tools.nsc.ast.Trees$Transformer$$anonfun$16.apply(Trees.scala:1066)
	at scala.tools.nsc.ast.Trees$Transformer.atOwner(Trees.scala:1191)
	at scala.tools.nsc.ast.Trees$Transformer.transform(Trees.scala:1065)
	at scala.tools.nsc.transform.Flatten$Flattener.transform(Flatten.scala:82)
	at scala.tools.nsc.ast.Trees$Transformer.transformUnit(Trees.scala:1186)
	at scala.tools.nsc.transform.Transform$Phase.apply(Transform.scala:30)
	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
Sean  edited on  2006-12-11 12:54:40.0
Nikolay  edited on  2006-12-12 10:08:34.0
I don't see how I can help in the resolution of this bug. Container is a type parameter, not an attribute. Reassigned to Martin.
Martin  edited on  2006-12-12 12:27:37.0