[code-reflection] RFR: Test Switch Expression lowering when case is constant [v2]
Maurizio Cimadamore
mcimadamore at openjdk.org
Mon Jul 22 09:07:51 UTC 2024
On Sun, 21 Jul 2024 19:22:58 GMT, Mourad Abbay <mabbay at openjdk.org> wrote:
>> Test Switch Expression lowering when case is constant.
>
> 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
src/jdk.compiler/share/classes/com/sun/tools/javac/comp/ReflectMethods.java line 1378:
> 1376: // Scan the lambda body
> 1377: if (tree.getBodyKind() == LambdaExpressionTree.BodyKind.EXPRESSION) {
> 1378: Value exprVal = toValue(((JCExpression) tree.body), tree.getDescriptorType(types).getReturnType());
This cast is probably redundant, as there's no variant of `toValue` that takes `JCStatement` that also takes a second parameter for the target type?
-------------
PR Review Comment: https://git.openjdk.org/babylon/pull/169#discussion_r1686219903
More information about the babylon-dev
mailing list