[patterns-record-deconstruction3] RFR: Fix deconstruction patterns with unconditional nested type pattern [v2]
Aggelos Biboudis
duke at openjdk.java.net
Tue Apr 26 13:17:49 UTC 2022
> 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
Aggelos Biboudis has refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to the previous content of the PR. The pull request contains one new commit since the last revision:
Address review
-------------
Changes:
- all: https://git.openjdk.java.net/amber/pull/81/files
- new: https://git.openjdk.java.net/amber/pull/81/files/97364ec6..787fca9f
Webrevs:
- full: https://webrevs.openjdk.java.net/?repo=amber&pr=81&range=01
- incr: https://webrevs.openjdk.java.net/?repo=amber&pr=81&range=00-01
Stats: 2 lines in 1 file changed: 0 ins; 2 del; 0 mod
Patch: https://git.openjdk.java.net/amber/pull/81.diff
Fetch: git fetch https://git.openjdk.java.net/amber pull/81/head:pull/81
PR: https://git.openjdk.java.net/amber/pull/81
More information about the amber-dev
mailing list