[#301] | project: compiler | priority: high | category: bug | |
---|---|---|---|---|
submitter | assigned to | status | date submitted | |
Matthias | Martin | fixed | 2004-03-02 15:34:50.0 | |
subject | Typechecker doesn't detect some unimplemented methods | |||
code |
class A { def foo: Object = new Object; } abstract class B extends A { override def foo: String; val x: String = foo; } object C extends A with B with Application; |
|||
what happened | The program compiles even though the abstract foo method of class B is not implemented in object C. Consequently, we get a runtime error when C is executed:Exception in thread "main" java.lang.AbstractMethodError: C$.foo()Ljava/lang/String; at C$.mixin$B$class$init$(T.scala:6) at C$. |
|||
what expected | The compiler should reject the object definition C. | |||
[back to overview] |
Martin edited on 2004-04-16 17:04:27.0 |