RFR: 8304671: javac regression: Compilation with --release 8 fails on underscore in enum identifiers

Christoph Langer clanger at openjdk.org
Thu Mar 23 06:57:43 UTC 2023


On Wed, 22 Mar 2023 12:44:49 GMT, Jan Lahoda <jlahoda at openjdk.org> wrote:

> `_` is a valid name for `--release 8`, but code that estimates if a piece of code is an enum constant or a member will fail to recognize that. This patch enhances the estimator to include `_` at the same level as identifiers.
> 
> For the estimator, it is not important if `_` is permitted for the given source level or not - the upper levels will produce proper errors/warnings. So, the estimator will consider `_` to be at the same level as an ordinary identifier.

Thanks for tackling that so quickly.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/13137#issuecomment-1480686959


More information about the compiler-dev mailing list