RFR: 8262889: Compiler implementation for Record Patterns
Aggelos Biboudis
abimpoudis at openjdk.java.net
Thu May 5 12:32:14 UTC 2022
On Thu, 5 May 2022 12:16:23 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
>> I think this is i) from the domination relation:
>>
>>> A record pattern with type R and record component pattern list L dominates another record pattern with type S and record component pattern list M if (i) the erasure of S is a subtype of the erasure of R, and (ii) every pattern, if any, in L dominates the corresponding pattern in M.
>
>> I think this is i) from the domination relation:
>>
>> > A record pattern with type R and record component pattern list L dominates another record pattern with type S and record component pattern list M if (i) the erasure of S is a subtype of the erasure of R, and (ii) every pattern, if any, in L dominates the corresponding pattern in M.
>
> But this subtyping test seems to happen at the level of the component pattern list, not at the R/S level, right?
You are right. It is the ii) which iteratively checks the component pattern list L.
-------------
PR: https://git.openjdk.java.net/jdk/pull/8516
More information about the core-libs-dev
mailing list