[code-reflection] RFR: 8337155: Support expressions returning boxed booleans for the condition blocks of if/do/while

Paul Sandoz psandoz at openjdk.org
Fri Aug 2 19:51:44 UTC 2024


On Thu, 25 Jul 2024 03:15:57 GMT, Mourad Abbay <mabbay at openjdk.org> wrote:

> Condition body of if or while or do-while should yield a boolean value

Marked as reviewed by psandoz (Lead).

src/jdk.compiler/share/classes/com/sun/tools/javac/comp/ReflectMethods.java line 1649:

> 1647:             Value last = toValue(cond);
> 1648:             // Yield the boolean result of the condition
> 1649:             last = convert(last, typeElementToType(JavaType.BOOLEAN));

Remove the "@@@ cond.type ..." comment above, same for other places.

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

PR Review: https://git.openjdk.org/babylon/pull/193#pullrequestreview-2216304411
PR Review Comment: https://git.openjdk.org/babylon/pull/193#discussion_r1702260049


More information about the babylon-dev mailing list