RFR: 8359145: Implement JEP 530: Primitive Types in Patterns, instanceof, and switch (Fourth Preview) [v4]

Aggelos Biboudis abimpoudis at openjdk.org
Thu Oct 30 16:45:55 UTC 2025


On Thu, 30 Oct 2025 12:50:14 GMT, Aggelos Biboudis <abimpoudis at openjdk.org> wrote:

>> PR for Primitive Types in Patterns, instanceof, and switch (Fourth Preview).
>> 
>> spec: https://cr.openjdk.org/~abimpoudis/instanceof/latest/
>
> Aggelos Biboudis has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Fix regression in Check

src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Check.java line 4752:

> 4750:                         if (types.isUnconditionallyExactCombined(currentType, testType) &&
> 4751:                                 label instanceof JCConstantCaseLabel) {
> 4752:                             dominated = !(testCaseLabel instanceof JCConstantCaseLabel) &&

Note that I turned `|=` into `=` @lahodaj

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27637#discussion_r2478807035


More information about the compiler-dev mailing list