[patterns-record-deconstruction3] Withdrawn: Fix deconstruction patterns with unconditional nested type pattern
Jan Lahoda
jlahoda at openjdk.java.net
Wed Apr 27 06:40:21 UTC 2022
On Fri, 22 Apr 2022 12:14:10 GMT, Aggelos Biboudis <duke at openjdk.java.net> wrote:
> According to the spec:
>
>
> class Super {}
> class Sub extends Super {}
> record R(Super s) {}
>
> public static void testRes(R r) {
> switch(r) {
> case R(Super s) -> System.out.println("a");
> }
> }
>
> testRes(new R(null)); // this should match since after resolution, the nested type pattern is transformed to an any pattern
This pull request has been closed without being integrated.
-------------
PR: https://git.openjdk.java.net/amber/pull/81
More information about the amber-dev
mailing list