[patterns-record-deconstruction3] RFR: Fix deconstruction patterns with unconditional nested type pattern [v3]

Aggelos Biboudis duke at openjdk.java.net
Wed Apr 27 06:36:17 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 updated the pull request incrementally with one additional commit since the last revision:

  Update TransPatterns.java

-------------

Changes:
  - all: https://git.openjdk.java.net/amber/pull/81/files
  - new: https://git.openjdk.java.net/amber/pull/81/files/787fca9f..5e40230b

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=amber&pr=81&range=02
 - incr: https://webrevs.openjdk.java.net/?repo=amber&pr=81&range=01-02

  Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 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