[#176] | project: compiler | priority: high | category: bug | |
---|---|---|---|---|
submitter | assigned to | status | date submitted | |
Matthias | Philippe | fixed | 2003-10-06 00:28:21.0 | |
subject | Mixins with abstract types | |||
code |
trait A { type T; def foo(x: T): Int; def bar: T; def test = foo(bar); } trait B { type S <: Object; type T = S; def foo(x: S): Int; def bar: S; } class C with A with B { class S; def foo(x: S) = 1; def bar = new S; } object Main with Executable { val x: A = new C; Console.println(x.test); } |
|||
what happened | The program compiles. At runtime, it yields the following exception:Exception in thread "main" java.lang.AbstractMethodError: C$class.bar()Ljava/lang/Object; at C$class.test(A.scala:5) at Main$.It looks like the compiler does not generate all bridge methods for class C. |
|||
what expected | Compiler, runtime positive. | |||
[back to overview] |
Matthias edited on 2003-10-06 00:28:43.0 |
Philippe edited on 2003-10-06 17:26:28.0 |
Added unaliasing code in Type.AsSeenFrom.apply for rebound types. |