RFR: 8303374: Compiler Implementation for Primitive types in patterns, instanceof, and switch (Preview) [v2]
Raffaello Giulietti
rgiulietti at openjdk.org
Thu Sep 28 17:22:25 UTC 2023
On Thu, 28 Sep 2023 16:46:11 GMT, Aggelos Biboudis <abimpoudis at openjdk.org> wrote:
>> This is the first draft of a patch for Primitive types in patterns, instanceof, and switch (Preview).
>>
>> Draft spec here: https://cr.openjdk.org/~abimpoudis/instanceof/instanceof-20230913/specs/instanceof-jls.html
>
> Aggelos Biboudis has updated the pull request incrementally with one additional commit since the last revision:
>
> Apply suggestions from code review
>
> Co-authored-by: Raffaello Giulietti <raffaello.giulietti at oracle.com>
There might be good reasons to have:
- `byte_char()` and `short_char()` in addition to `int_char()`
- `short_byte()` and `char_byte()` in addition to `int_byte()`
- `char_short()` in addition to `int_short()`
but I cannot see the rationale.
Maybe due to the language rules?
Or are they needed for the implementation of patterns, instanceof and switch?
-------------
PR Comment: https://git.openjdk.org/jdk/pull/15638#issuecomment-1739727897
More information about the compiler-dev
mailing list