| [#1096] | project: compiler | priority: medium | category: bug | |
|---|---|---|---|---|
| submitter | assigned to | status | date submitted | |
| Iulian | Martin | fixed | 2007-05-10 14:32:01.0 | |
| subject | [contrib #463] VerifyError with early field initializer (again) | |||
| code |
VerifyError:
trait A
class B extends {
val obj = new Object {}
} with A
It works without anonymous subclassing:
trait A
class B extends {
val obj = new Object
} with A |
|||
| what happened | java.lang.VerifyError: (class: B, method: |
|||
| what expected | No VerifyError. | |||
| [back to overview] | ||||
| Iulian edited on 2007-05-10 15:46:59.0 |
| This should not pass typing, since the anonymous class created in the early initialization section is taking an 'outer' parameter, the uninitialized 'this': new template $anon(B.this) Writing such code by hand is properly rejected, it seems the explicit outer phase is typing these statements in a more relaxed mode. |
| Martin edited on 2007-05-11 02:31:45.0 |