RFR: JDK-8247352: improve error messages for sealed classes and records

Maurizio Cimadamore maurizio.cimadamore at oracle.com
Fri Sep 4 20:49:22 UTC 2020


Looks good

the only comment is that you use strings like "anonymous" and "local" as 
direct diagnostic arguments. This makes localization complex (if not 
impossible) because not all the English text is defined in 
compiler.properties.

I suggest introducing a diagnostic fragment for this purpose, and pass 
the fragment as an argument to the "cant extends sealed" diagnostics.

Maurizio

On 04/09/2020 02:31, Vicente Romero wrote:
>
> [1] https://bugs.openjdk.java.net/browse/J


More information about the compiler-dev mailing list