[#1139] | project: compiler | priority: low | category: bug | |
---|---|---|---|---|
submitter | assigned to | status | date submitted | |
Sean | Martin | open | 2007-05-24 22:19:02.0 | |
subject | bridge not generated in trait/case class construction | |||
code |
// test/Test.scala, derived from my own code package test; trait Extension { trait SpanNode trait LinkedNode { trait ParseNode extends SpanNode; def ParseNode : SpanNode } def f(node : LinkedNode) : SpanNode = node.ParseNode } object Test extends Extension { trait LinkedNode extends super.LinkedNode { case class ParseNode extends super.ParseNode; } class LinkedNode0 extends Test.LinkedNode def main(args : Array[String]) : Unit = { val n = new LinkedNode0 n.ParseNode // OK f(n) // throws AME } } |
|||
what happened | Exception in thread "main" java.lang.AbstractMethodError: test.Test$LinkedNode0.ParseNode()Ltest/Test$LinkedNode\ $ParseNode; at test.Test$LinkedNode0.ParseNode(Test.scala:15) at test.Extension$class.f(Test.scala:9) at test.Test$.f(Test.scala:11) at test.Test$.main(Test.scala:19) at test.Test.main(Test.scala) Seems like a bridge method in LinkedNode with the signature ParseNode.SpanNode is expected by Extension, but not\ generated given that the case class is defined in a trait. |
|||
what expected | ||||
[back to overview] |
Martin edited on 2007-06-01 18:00:05.0 |
This might go away once we change case factory methods to objects. Deferred |