RFR: 8311825: Duplicate qualified enum constants not detected
Vicente Romero
vromero at openjdk.org
Thu Jul 13 20:13:12 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).
looks good
-------------
Marked as reviewed by vromero (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/14870#pullrequestreview-1529171467
More information about the compiler-dev
mailing list