Parenthesized "this" and final fields

Tagir Valeev amaembo at gmail.com
Fri Jun 8 00:38:20 UTC 2018


Hello!

On Fri, Jun 8, 2018 at 3:54 AM, Maurizio Cimadamore <
maurizio.cimadamore at oracle.com> wrote:

>
>
>> Still, right now, JLS10 says that Tagir's first example, with parentheses
>> removed, should compile, but he says it doesn't:
>>
>> class Unassigned {
>>   final int x = this.y + 1;
>>   final int y = this.x + 1;
>> }
>>
> I tested it and this compiles correctly. I don't know what specific
> example Tagir was referring to.
>

Sorry for confusion. I don't know why I decided this does not compile,
probably tried wrong source file. Yes, it compiles correctly for me. Please
forget this case then.

With best regards,
Tagir Valeev.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/compiler-dev/attachments/20180608/aba1845d/attachment.html>


More information about the compiler-dev mailing list