RFR: JDK-8235149: javac parser is too aggressive on ambiguous expressions using identifier: record

Vicente Romero vicente.romero at oracle.com
Mon Jan 27 23:44:05 UTC 2020



On 1/27/20 6:30 PM, Maurizio Cimadamore wrote:
> Looks good.
>
> Partially related question - is it normal/expected that we issue 
> warning for a restricted type name even when preview features are 
> disabled?

in the case of records we decided to issue a warning for its use as a 
type even if preview features were disabled. I think to remember that we 
enabled the warning in JDK 13 to warn users in advance

>
> Maurizio

Vicente

>
> On 27/01/2020 16:37, Vicente Romero wrote:
>> Hi,
>>
>> Please review the fix for [1] at [2] which fixes a too aggressive 
>> approach in the parser which is issuing errors for acceptable used of 
>> the `record` identifier in cases when the preview feature flag is not 
>> set.
>>
>> Thanks,
>> Vicente
>>
>> PS, as part of the patch I have also removed a couple of debug 
>> statements from RecordCompilationTests in an unrelated test.
>>
>> [1] https://bugs.openjdk.java.net/browse/JDK-8235149
>> [2] http://cr.openjdk.java.net/~vromero/8235149/webrev.00/



More information about the compiler-dev mailing list