RFR: JDK-8240454: incorrect error message: as of release 13, 'record' is a restricted type name
Vicente Romero
vicente.romero at oracle.com
Wed Mar 4 17:41:30 UTC 2020
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