[#145] | project: compiler | priority: medium | category: bug | |
---|---|---|---|---|
submitter | assigned to | status | date submitted | |
Matthias | Martin | fixed | 2003-09-16 14:25:06.0 | |
subject | Specific super class reference yields IncompatibleClassChangeError | |||
code |
trait J[T] { def foo(x: T): Int; } trait I[T] with J[T] { override def foo(x: T): Int = super[J].foo(x) + 1; } class C { def foo(x: Int): Int = x; } class D extends C with I[Int]; object T with Executable { System.out.println((new D).foo(3)); } |
|||
what happened | Compiles, but at runtime we get:Exception in thread "main" java.lang.IncompatibleClassChangeError at D$class.foo(Y.scala:5) at D$class.foo(Y.scala:5) at T$. |
|||
what expected | Compiles & runs. | |||
[back to overview] |
Michel edited on 2003-09-30 10:59:27.0 |
In my opinion the code above should be rejected by the compiler, for the following reason: we have two kinds of
The first kind (written simply
Ths second kind of super, which refers to methods of mixins (written |
Martin edited on 2003-10-08 20:48:25.0 |