[jdk17] RFR: 8269146: Missing unreported constraints on pattern and other case label combination [v2]
Jan Lahoda
jlahoda at openjdk.java.net
Thu Jul 8 15:36:18 UTC 2021
On Thu, 1 Jul 2021 13:26:25 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.
>
> Jan Lahoda has updated the pull request incrementally with one additional commit since the last revision:
>
> Fixing fallthrough.
I've updated the patch so that the new (/structural) tests are moved from Attr to Check. To me, looks better. What do you think?
Thanks!
-------------
PR: https://git.openjdk.java.net/jdk17/pull/194
More information about the compiler-dev
mailing list