RFR: 8303374: Implement JEP 455: Primitive Types in Patterns, instanceof, and switch (Preview) [v47]
Maurizio Cimadamore
mcimadamore at openjdk.org
Wed Jan 24 21:50:34 UTC 2024
On Wed, 24 Jan 2024 19:33:52 GMT, Aggelos Biboudis <abimpoudis at openjdk.org> wrote:
>> This is the proposed patch for Primitive types in patterns, instanceof, and switch (Preview).
>>
>> Draft spec here: https://cr.openjdk.org/~abimpoudis/instanceof/latest/
>
> Aggelos Biboudis has updated the pull request incrementally with one additional commit since the last revision:
>
> Introduce ExactnessConversionsSupportTest
src/java.base/share/classes/java/lang/runtime/ExactConversionsSupport.java line 33:
> 31: * said to be unconditionally exact.
> 32: * <p>
> 33: * For example, a conversion from {@code int} to {@code byte} for the value 10
Very nice text!
src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java line 5045:
> 5043: }
> 5044:
> 5045: if (target.isPrimitive()) {
nit: maybe now a ternary expression can be used
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/15638#discussion_r1465579085
PR Review Comment: https://git.openjdk.org/jdk/pull/15638#discussion_r1465580461
More information about the core-libs-dev
mailing list