[code-reflection] RFR: Represents literals of type byte/short as permitted in the Java language [v2]

Maurizio Cimadamore mcimadamore at openjdk.org
Wed Mar 12 18:24:11 UTC 2025


On Wed, 12 Mar 2025 17:58:59 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 with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains two additional commits since the last revision:
> 
>  - Merge branch 'code-reflection' into fix-literal-type
>  - Represents literals of type byte/short as permitted in the Java language.

Changes look good - I left some comments to improve the code clarity. I think this PR also needs a test of the model that comes out of javac.

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

PR Review: https://git.openjdk.org/babylon/pull/351#pullrequestreview-2679481548


More information about the babylon-dev mailing list