| [#175] | project: compiler | priority: medium | category: bug | |
|---|---|---|---|---|
| submitter | assigned to | status | date submitted | |
| Michel | Michel | fixed | 2003-10-03 11:38:25.0 | |
| subject | cannot define secondary constructors in abstract classes | |||
| code |
abstract class C {
def this(x: Unit) = { this() }
}
|
|||
| what happened | The compiler complains with the following error message: |
|||
| what expected | no errors | |||
| [back to overview] | ||||
| Martin edited on 2003-10-08 16:55:00.0 |
I changed the code which copies the modifiers. The program now compiles, but generates a backend crash:
xception in thread "main" java.lang.AssertionError: void -> java.lang.Object at scalac.backend.jvm.GenJVM.genWidenConversion(GenJVM.java:927) at scalac.backend.jvm.GenJVM.genLoad(GenJVM.java:559) at scalac.backend.jvm.GenJVM.genLoad(GenJVM.java:228) at scalac.backend.jvm.GenJVM.genLoadQualifier(GenJVM.java:593) at scalac.backend.jvm.GenJVM.genLoad(GenJVM.java:249) at scalac.backend.jvm.GenJVM.gen(GenJVM.java:165) at scalac.backend.jvm.GenJVM.gen(GenJVM.java:199) at scalac.backend.jvm.GenJVM.gen(GenJVM.java:143) at scalac.backend.jvm.GenJVM.gen(GenJVM.java:138) at scalac.backend.jvm.GenJVM.translate(GenJVM.java:110) at scalac.backend.jvm.GenJVMPhase.apply(GenJVMPhase.java:45) at scalac.Global.compile(Global.java:293) at scalac.Global.compile(Global.java:266) at scalac.Main.main(Main.java:32) |
| Philippe edited on 2003-10-15 15:10:47.0 |
|
The problem raised after Martin's change is the same as the one that caused bug 160. It is fixed, now. |