[code-reflection] RFR: Test Switch Expression lowering when case is constant [v3]
Paul Sandoz
psandoz at openjdk.org
Fri Aug 2 22:07:57 UTC 2024
On Thu, 25 Jul 2024 09:34:35 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
>> Mourad Abbay has updated the pull request incrementally with three additional commits since the last revision:
>>
>> - Write code models without location info
>> - Fix a typo
>> - Add compiler tests of Switch Expression.
>
> test/langtools/tools/javac/reflect/SwitchExpressionTest2.java line 76:
>
>> 74: ()java.lang.String -> {
>> 75: %7 : java.lang.String = constant @"BAR";
>> 76: java.yield %7;
>
> unrelated: but I found the distinction between `yield` and `java.yield` a bit confusing...
Indeed it is confusing. The core operation `yield` means to yield a value from a body, where as the extended operation `java.yield` models Java's `yield` statement. Perhaps rename the former to `body.yield`?
-------------
PR Review Comment: https://git.openjdk.org/babylon/pull/169#discussion_r1702361313
More information about the babylon-dev
mailing list