[code-reflection] RFR: Update the model of pattern matching when pattern variable identifier is underscore [v6]
Paul Sandoz
psandoz at openjdk.org
Mon Sep 16 17:13:20 UTC 2024
On Sun, 15 Sep 2024 04:22:58 GMT, Mourad Abbay <mabbay at openjdk.org> wrote:
>> src/java.base/share/classes/java/lang/reflect/code/op/CoreOp.java line 2171:
>>
>>> 2169: super(NAME, List.of(init));
>>> 2170:
>>> 2171: this.varName = varName == null || varName.isEmpty() ? null : varName;
>>
>> Was there is a reason why you check for an empty string?
>
> The compiler code may pass an empty string for the name of the Var, e.g. unnamed pattern variable.
I think we should address that. Up to you if you wanna fix that in this PR or do it in a follow on PR.
-------------
PR Review Comment: https://git.openjdk.org/babylon/pull/227#discussion_r1761537750
More information about the babylon-dev
mailing list