RFR: 8314423: Multiple patterns without unnamed variables

Aggelos Biboudis abimpoudis at openjdk.org
Wed Aug 16 15:01:27 UTC 2023

This PR addresses both [JDK-8314423](https://bugs.openjdk.org/browse/JDK-8314423) and [JDK-8314216](https://bugs.openjdk.org/browse/JDK-8314216), since both are relevant to checks around the structure of switch in the relevant method in `Check`. Additionally a check was needed in `analyzePattern` to detect that when a case starts with a constant case label followed by a `,` or `->` is indeed a constant expression and not a pattern as previously signified.


Commit messages:
 - 8314423: Multiple patterns without unnamed variables

Changes: https://git.openjdk.org/jdk/pull/15310/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15310&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8314423
  Stats: 68 lines in 6 files changed: 68 ins; 0 del; 0 mod
  Patch: https://git.openjdk.org/jdk/pull/15310.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/15310/head:pull/15310

PR: https://git.openjdk.org/jdk/pull/15310

More information about the compiler-dev mailing list