RFR: 8204610: Compiler confused by parenthesized "this" in final fields assignments

Vicente Romero vicente.romero at oracle.com
Fri Jun 8 14:43:43 UTC 2018


looks good,

Vicente

On 06/08/2018 09:55 AM, Maurizio Cimadamore wrote:
> Hi,
> this patch fixes the problem we have been talking about yesterday [1].
>
> Basically, javac does not consistently skip parenthesis when enforcing 
> foward refs and DA/DU rules.
>
> I decided to consolidate the 'is this a variable name, possibly 
> qualified by "this" ', into a separate TreeInfo routine, and call that 
> from Flow and Attr (it turned out that the wrong logic was applied in 
> both places).
>
> I have included a combo test which tests several combinations of the kind
>
> ((this).(x)) = 1
>
> This might include (as in the example above, as the selected variable 
> symbol can't be wrapped in its own parenthesis) nonsensical 
> combination, which the test makes sure they are rejected.
>
> Webrev:
>
> http://cr.openjdk.java.net/~mcimadamore/8204610/
>
> Cheers
>
> Maurizio
>
> [1] - 
> http://mail.openjdk.java.net/pipermail/compiler-dev/2018-June/012005.html
>



More information about the compiler-dev mailing list