[code-reflection] RFR: Represents literals of type byte/short as permitted in the Java language [v4]
Paul Sandoz
psandoz at openjdk.org
Mon Mar 24 21:00:27 UTC 2025
On Wed, 12 Mar 2025 23:08:37 GMT, Mourad Abbay <mabbay at openjdk.org> wrote:
>> Before this PR, we had literals of type byte/short in the code model, but that's not permitted by the Java language. In Java, a literals of type byte/short is a literal of type int + conversion to the type byte/short.
>
> Mourad Abbay has updated the pull request incrementally with one additional commit since the last revision:
>
> Add tests to make sure literals of type byte/short are created the way Java language permit.
Looks good.
@grfrost this might impact C99 gen (see example tests, you could check if the variable's initial value is the result of a primitive conversion op and check if value to be converted is the result of a constant op)
-------------
Marked as reviewed by psandoz (Lead).
PR Review: https://git.openjdk.org/babylon/pull/351#pullrequestreview-2711663439
More information about the babylon-dev
mailing list