[#1241] | project: compiler | priority: medium | category: bug | |
---|---|---|---|---|
submitter | assigned to | status | date submitted | |
Stephane | Martin | fixed | 2007-07-24 13:49:20.0 | |
subject | structural type error | |||
code |
object test extends Application { // more.. type T = { def hello() } //val x4 = new AnyRef { def hello() { println("4") } } // ok! val x4 = new T { def hello() { println("4") } } // error! x4.hello() // more.. } |
|||
what happened | test.scala:16: error: |
|||
what expected | better error message or prints "4" | |||
[back to overview] |
Martin edited on 2007-07-25 16:35:59.0 |
You now get: bug1241.scala:5: error: AnyRef{def hello(): Unit} does not have a constructor val x4 = new T { def hello() { println("4") } } // error! ^ |
Stephane edited on 2007-07-27 13:29:21.0 |