RFR: 8302344: Compiler Implementation for Unnamed patterns and variables (Preview) [v13]

Vicente Romero vromero at openjdk.org
Thu May 4 18:55:21 UTC 2023


On Thu, 4 May 2023 17:48:28 GMT, Aggelos Biboudis <abimpoudis at openjdk.org> wrote:

>> This PR implements [JEP 443](https://openjdk.org/jeps/443), the preview feature for Unnamed Patterns and Variables in Java.
>> 
>> Draft Spec: https://cr.openjdk.org/~abimpoudis/unnamed/latest/
>
> Aggelos Biboudis has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Add test

src/jdk.compiler/share/classes/com/sun/source/tree/VariableTree.java line 54:

> 52: 
> 53:     /**
> 54:      * Returns the name of the variable being declared or `_` if the variable

I guess if we go full for the empty name then this will need to change too

src/jdk.compiler/share/classes/com/sun/tools/javac/comp/TransPatterns.java line 69:

> 67: import com.sun.tools.javac.util.Names;
> 68: 
> 69: import java.util.*;

nit: I think we prefer not using star imports, this was probably done by the IDE

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

PR Review Comment: https://git.openjdk.org/jdk/pull/13528#discussion_r1185336672
PR Review Comment: https://git.openjdk.org/jdk/pull/13528#discussion_r1185393785


More information about the kulla-dev mailing list