[#399] | project: compiler | priority: high | category: bug | |
---|---|---|---|---|
submitter | assigned to | status | date submitted | |
Michel | Philippe | fixed | 2005-02-18 08:10:10.0 | |
subject | Redefinition of final methods due to mixins | |||
code |
object Main { def f(x: String): AnyRef = { trait C { def f: String = x; } class D with C; class E with D; class F with C; class G extends D with F; new G : AnyRef } def main(args: Array[String]): Unit = { System.out.println(f("a")); } } |
|||
what happened | With the currently released compiler (1.3.0.9), the above code compiles and runs. With the current CVS it compil\ es, but fails at run time with a VerifyError, due to a final method being redefined. The method in question is t\ he accessor for "x" added to trait "C", which ends up being both copied and inherited into "G". |
|||
what expected | Correct execution. I have the impression that the above problem was added pretty recently, and might be due to the fix for the mixin problem. I've given it high priority because it makes run time types fail completely, and because it's a regression. | |||
[back to overview] |
Philippe edited on 2005-02-18 19:42:02.0 |
Fixed the symbol source comparision in ExpandMixin. |