[jdk17] Integrated: 8269146: Missing unreported constraints on pattern and other case label combination
Jan Lahoda
jlahoda at openjdk.java.net
Fri Jul 9 08:07:03 UTC 2021
On Thu, 1 Jul 2021 11:29:03 GMT, Jan Lahoda <jlahoda at openjdk.org> wrote:
> 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.
This pull request has now been integrated.
Changeset: 885f7b11
Author: Jan Lahoda <jlahoda at openjdk.org>
URL: https://git.openjdk.java.net/jdk17/commit/885f7b1141d1d8e6b560ebaf0c2d4878be0ea8ba
Stats: 319 lines in 8 files changed: 290 ins; 13 del; 16 mod
8269146: Missing unreported constraints on pattern and other case label combination
8269301: Switch statement with a pattern, constant and default label elements crash javac
Reviewed-by: mcimadamore
-------------
PR: https://git.openjdk.java.net/jdk17/pull/194
More information about the compiler-dev
mailing list