[code-reflection] RFR: Update the model of pattern matching when pattern variable identifier is underscore [v2]
Mourad Abbay
mabbay at openjdk.org
Tue Sep 10 15:11:18 UTC 2024
On Tue, 10 Sep 2024 14:59:40 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
>> Mourad Abbay has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Update effected tests
>
> src/jdk.compiler/share/classes/com/sun/tools/javac/comp/ReflectMethods.java line 1229:
>
>> 1227:
>> 1228: String varName = var.name.isEmpty() ? "_" : var.name.toString();
>> 1229: result = append(ExtendedOp.bindingPattern(typeToTypeElement(var.type), varName));
>
> Note sure about this - it's not like the variable has name `_`. The variable does **not** have a name. Which means there should be a way to build a pattern binding (and, more generally, `Var`) that do not have a name (I think?)
Type pattern can't use var
-------------
PR Review Comment: https://git.openjdk.org/babylon/pull/227#discussion_r1752170920
More information about the babylon-dev
mailing list