RFR: JDK-8240454: incorrect error message: as of release 13, 'record' is a restricted type name
Jan Lahoda
jan.lahoda at oracle.com
Thu Mar 5 14:25:06 UTC 2020
Looks reasonable to me.
Jan
On 04. 03. 20 18:41, Vicente Romero wrote:
> Please review the fix for [1] at [2]. For this code:
>
> class record {}
>
> javac was issuing this error message:
>
> class record {}
> ^
> as of release 13, 'record' is a restricted type name and cannot be
> used for type declarations
>
> it should mention release 14 instead. This fix alters code that will
> affect similar error messages not only for uses of `record` but also of
> `yield`. In adding support for the test case I had modified several test
> libraries, in particular to be able to check not only the error key of
> the error issued by javac but also the parameters as in this case the
> difference was in the parameter passed to the error. Please review those
> changes too.
>
> Thanks,
> Vicente
>
> [1] https://bugs.openjdk.java.net/browse/JDK-8240454
> [2] http://cr.openjdk.java.net/~vromero/8240454/webrev.00/
More information about the compiler-dev
mailing list