Integrated: 8311825: Duplicate qualified enum constants not detected
Jan Lahoda
jlahoda at openjdk.org
Fri Jul 14 09:58:09 UTC 2023
On Thu, 13 Jul 2023 12:52:28 GMT, Jan Lahoda <jlahoda at openjdk.org> wrote:
> Duplicate enum constant check is missing for switches, when the qualified constants are used, so code like:
>
> switch (...) {
> case E.A -> {}
> case E.A -> {}
> }
>
>
> Does not produce any errors. This patch is trying to fix this problem by adding the duplicate checks (sadly the codepaths are distinct, so the check is simply added to the various codepaths).
This pull request has now been integrated.
Changeset: d1fa1a86
Author: Jan Lahoda <jlahoda at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/d1fa1a868636dc15e96d1b4bf4acf28257c9551f
Stats: 33 lines in 3 files changed: 31 ins; 0 del; 2 mod
8311825: Duplicate qualified enum constants not detected
Reviewed-by: vromero
-------------
PR: https://git.openjdk.org/jdk/pull/14870
More information about the compiler-dev
mailing list