Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Minor
-
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
I can't write neither:
class A(i:Int) {this.i==4} {}
class B(i:Int) {self.i==4} {}
Errors:
C:\cygwin\home\Yoav\test\Hello.x10:3: This or super cannot be used (implicitly or explicitly) in a constructor return type.
Type: A{A#this.i==4, self.i==i}
C:\cygwin\home\Yoav\test\Hello.x10:4: self may only be used within a dependent type
2 errors.
I think we should allow both, and they should refer to the same object.
Issue Links
- is depended upon by
-
XTENLANG-2742
"self" should be allowed in class invariants.
-
-
XTENLANG-2439
X10 2.2 language design decisions (umbrella)
-
Bulk-assigning unscheduled issues to the next release.