scala / bug

Scala 2 bug reports only. Please, no questions — proper bug reports only.
https://scala-lang.org
232 stars 21 forks source link

trait in class crasher #2148

Closed scabug closed 13 years ago

scabug commented 15 years ago

I'm not necessarily suggesting this should do anything useful, just that it shouldn't crash.

scala> class A { var i = 0 ; trait A1 extends A { i += 1 } }
defined class A

scala> new A with A#A1                                      
Exception in thread "main" java.lang.AssertionError: assertion failed: $$iw.$$iw.A
    at scala.Predef$$.assert(Predef.scala:97)
    at scala.tools.nsc.ast.TreeGen.mkAttributedQualifier(TreeGen.scala:75)
    at scala.tools.nsc.ast.TreeGen.mkAttributedQualifier(TreeGen.scala:41)
    at scala.tools.nsc.transform.ExplicitOuter$$ExplicitOuterTransformer.mixinOuterAccessorDef(ExplicitOuter.scala:323)
scabug commented 15 years ago

Imported From: https://issues.scala-lang.org/browse/SI-2148?orig=1 Reporter: @paulp

scabug commented 14 years ago

@paulp said: (In r20603) Test case for #2148. Closes #2148, no review.