Details
-
Type:
Improvement
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: X10 2.0.5
-
Fix Version/s: X10 2.3.2
-
Component/s: X10 Compiler: Front-end Typechecking
-
Labels:None
-
Number of attachments :
Description
class Bla {
def this() {
val z = 0;
this(4);
}
def this(i:String) {}
}
C:\cygwin\home\Yoav\test\Hello.x10:8: No valid method call found for apply(x10.lang.String) in Bla{self==Bla#this}.
The error should be:
Call to "this" must be the first statement in constructor.
(We should copy the error messages wording from Java!)
I thought the proto rules in X10 allowed statements before the this(), super(), and property() calls...