Details
Description
I'd like an operation that inserts the right casts on everywhere in the region that needs them.
(Cf. recent discussion on X10-core, where these casts would be done implicitly.)
For example, applying that operation would turn
def a(x:Point{rank==3}) = x(2);
def b(x:Point) = a(x);
to
def a(x:Point{rank==3}) = x(2);
def b(x:Point) = a(x as Point{rank==3});
Adding the cast in b().
I understand that specifying this is nontrivial, and doing it will require a significant amount of dancing with the type checker.
Issue Links
- relates to
-
XTENLANG-1201
'at'-ify and (x as T!)-ify operations in X10DT
-
How is this different from the usual "Quick Fix" concept that Eclipse (or, rather, the JDT has)? Are you proposing a particular kind of a quick fix? This would be for a constraint mismatch, I presume?