[#630] | project: nsc | priority: low | category: bug | |
---|---|---|---|---|
submitter | assigned to | status | date submitted | |
Nikolay | Martin | fixed | 2006-06-19 15:32:39.0 | |
subject | [contrib #155] Mixin member type restrictions not always checked | |||
code |
trait Req1 trait Req2 { def test = Console.println("Test") } trait Foo { val foo : Req1 } trait Bar { val foo : Req2 def test = foo.test } object Test extends Foo with Bar { object foo extends Req1 def main(argv : Array[String]) = test } |
|||
what happened | At runtime:Exception in thread "main" java.lang.AbstractMethodError: Test$.foo()LReq2; at Bar$class.test(test.scala:13) at Test$.test(test.scala:16) at Test$.main(test.scala:22) at Test.main(test.scala) |
|||
what expected | Error at compile time: the instantiated type of 'foo' does not meet the requirements of 'Bar'. | |||
[back to overview] |
Nikolay edited on 2006-06-19 15:33:39.0 |
Iulian edited on 2006-06-19 16:59:41.0 |
I reassigned this to Martin, as it seems like a type checking issue. |
Martin edited on 2006-06-21 17:26:17.0 |