[code-reflection] RFR: Test Switch Expression lowering when case is constant [v2]

Mourad Abbay mabbay at openjdk.org
Mon Jul 22 15:32:46 UTC 2024


On Mon, 22 Jul 2024 09:09:47 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:

>> 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 six additional commits since the last revision:
>> 
>>  - Create overloads of method toValue.
>>  - Merge branch 'code-reflection' into test-sw-lowering
>>  - Merge branch 'code-reflection' into test-sw-lowering
>>  - Remove misleading comment
>>  - Test switch expression lowering when case is constant
>>  - Remove switch expression lowering tests
>
> test/jdk/java/lang/reflect/code/TestSwitchExpressionOp.java line 19:
> 
>> 17: public class TestSwitchExpressionOp {
>> 18: 
>> 19:     @Test
> 
> Shouldn't we add similar tests in the compiler (with the `@IR` annotation) to check that the model generated by javac contains the expected conversions?

You mean a test similar to `caseConstantOtherKindsOfExpr` ?

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

PR Review Comment: https://git.openjdk.org/babylon/pull/169#discussion_r1686746177


More information about the babylon-dev mailing list