RFR: JDK-8247352: improve error messages for sealed classes and records
Remi Forax
forax at univ-mlv.fr
Fri Sep 4 12:05:26 UTC 2020
Hi,
there is another message that could be improved,
when someone try to use inheritance with a record,
the error message is pretty obscure.
record Foo() extends Object {
}
the current error message is
Error:
'{' expected
record Foo() extends Object {}
^
regards,
Rémi
----- Mail original -----
> De: "Vicente Romero" <vicente.romero at oracle.com>
> À: "compiler-dev" <compiler-dev at openjdk.java.net>
> Envoyé: Vendredi 4 Septembre 2020 03:31:11
> Objet: RFR: JDK-8247352: improve error messages for sealed classes and records
> Hi,
>
> Please review the fix for [1] at [2]. The patch is basically changing
> some error messages for records and sealed classes trying to make them
> easier to digest by the user. The bug entry at [1] list some code
> snippets that motivated this fix,
>
> Thanks,
> Vicente
>
> [1] https://bugs.openjdk.java.net/browse/JDK-8247352
> [2] http://cr.openjdk.java.net/~vromero/8247352/webrev.00/
More information about the compiler-dev
mailing list