[code-reflection] RFR: Update the model of pattern matching when pattern variable identifier is underscore [v2]
Maurizio Cimadamore
mcimadamore at openjdk.org
Tue Sep 10 15:02:25 UTC 2024
On Tue, 10 Sep 2024 07:19:51 GMT, Mourad Abbay <mabbay at openjdk.org> wrote:
>> Update the generated code model of pattern matching when pattern variable identifier is "_"
>
> 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?)
-------------
PR Review Comment: https://git.openjdk.org/babylon/pull/227#discussion_r1752155132
More information about the babylon-dev
mailing list