john.r.rose at oracle.com
Fri Sep 6 01:50:48 UTC 2019
On Sep 5, 2019, at 5:54 PM, Brian Goetz <brian.goetz at oracle.com> wrote:
> In that case, what we would see is that on exit, neither i nor j were either DA or DU, and we would issue a compiler error. For each field, there are three possibilities:
> - The field is DU on all paths out of the ctor; we initialize it from the corresponding parameter.
> - The field is DA on all paths out of the ctor; we do nothing.
> - The field is neither DU nor DA on some path out of the ctor; error.
> We could extend this analysis to the init block, where if its either of the first two cases, we feed that information back into the ctor analysis, and always error in the third case -- the real question is whether its worth the bother.
OK, I’m missing something subtle here. Is the assignment “j = j” sugar for “this.j = j”, where the latter j is the component parameter?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the amber-spec-experts