[jdk17] RFR: 8269146: Missing unreported constraints on pattern and other case label combination
Jan Lahoda
jlahoda at openjdk.java.net
Thu Jul 1 11:36:16 UTC 2021
There is a number of constraints on the case label forms - patterns cannot be combined with patterns, etc. Currently, the checks are implemented by checking if there are clashing bindings. But this misses some of the cases which should lead to errors. This patch proposes to implement explicit checks on the structure of the case labels in `Attr.handleSwitch`, rather than relying on clashing bindings.
-------------
Commit messages:
- Adding test summary.
- Improving code.
- Merging master into JDK-8269146
- 8269146: Missing unreported constraints on pattern and other case label combination
Changes: https://git.openjdk.java.net/jdk17/pull/194/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk17&pr=194&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8269146
Stats: 323 lines in 6 files changed: 259 ins; 41 del; 23 mod
Patch: https://git.openjdk.java.net/jdk17/pull/194.diff
Fetch: git fetch https://git.openjdk.java.net/jdk17 pull/194/head:pull/194
PR: https://git.openjdk.java.net/jdk17/pull/194
More information about the compiler-dev
mailing list