Integrated: 8304671: javac regression: Compilation with --release 8 fails on underscore in enum identifiers
Jan Lahoda
jlahoda at openjdk.org
Thu Mar 23 08:39:04 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.
This pull request has now been integrated.
Changeset: 63d4afbe
Author: Jan Lahoda <jlahoda at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/63d4afbeb17df4eff0f65041926373ee62a8a33a
Stats: 190 lines in 2 files changed: 181 ins; 2 del; 7 mod
8304671: javac regression: Compilation with --release 8 fails on underscore in enum identifiers
Reviewed-by: vromero, darcy
-------------
PR: https://git.openjdk.org/jdk/pull/13137
More information about the compiler-dev
mailing list