Integrated: 8290709: Incorrect dominance error for unconditional pattern vs. null
Aggelos Biboudis
abimpoudis at openjdk.org
Thu Sep 1 16:13:21 UTC 2022
On Wed, 3 Aug 2022 16:12:55 GMT, Aggelos Biboudis <abimpoudis at openjdk.org> wrote:
> The corresponding JLS rule (3rd preview feature of pattern switch) on unconditional patterns & null does not exist anymore:
>
> Check:
>
> - 2nd preview: https://cr.openjdk.java.net/~gbierman/jep420/jep420-20211208/specs/patterns-switch-jls.html#jls-14.11.1
> - 3rd preview: https://cr.openjdk.java.net/~gbierman/jep427%2b405/jep427+405-20220601/specs/patterns-switch-record-patterns-jls.html#jls-14.11.1
>
> Effectively, the following restriction was lifted:
>
> A switch label that has a pattern case label element p that is total for the type of the selector expression of the enclosing switch statement or switch expression dominates a switch label that has a null case label element.
>
>
> The corresponding neg-tests where now promoted as pos-tests.
This pull request has now been integrated.
Changeset: 9444a081
Author: Aggelos Biboudis <abimpoudis at openjdk.org>
Committer: Jan Lahoda <jlahoda at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/9444a081cc9873caa7b5c6a78df0d1aecda6e4f1
Stats: 66 lines in 6 files changed: 25 ins; 20 del; 21 mod
8290709: Incorrect dominance error for unconditional pattern vs. null
Reviewed-by: jlahoda
-------------
PR: https://git.openjdk.org/jdk/pull/9732
More information about the compiler-dev
mailing list