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

Vicente Romero vromero at openjdk.org
Wed Mar 22 17:56:34 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.

looks sensible

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

Marked as reviewed by vromero (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/13137#pullrequestreview-1353182887


More information about the compiler-dev mailing list