Relates :
|
|
Relates :
|
Currently the spec describes the string `non-sealed` as a reserved keyword. This means that according to the spec the following code should fail to compile: int test(int non, int sealed) { return non-sealed; } However, this code compiles correctly (with the preview enabled). The spec should be updated with a notion of *contextual keyword* to allow `non-sealed` to be considered a keyword only in the places where needed. See http://cr.openjdk.java.net/~gbierman/jep397/jep397-20201104/specs/contextual-keywords-jls.html