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

Maurizio Cimadamore mcimadamore at openjdk.org
Wed May 17 23:34:03 UTC 2023


On Wed, 17 May 2023 14:23:37 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:
> 
>   Simplify `LambdaClassifier`
>   
>   Co-authored-by: Maurizio Cimadamore <maurizio.cimadamore at oracle.com>

src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavacParser.java line 2070:

> 2068: 
> 2069:         /**
> 2070:          * analyzeParens() has already classified the lambda as EXPLICIT_LAMBDA, due to

Many thanks for adding these precious comments!

src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavacParser.java line 2083:

> 2081:             if (param.name == names.error) {
> 2082:                 reduce(LambdaParameterKind.IMPLICIT);
> 2083:                 return;

could we use if/else if/else and get rid of return?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/13528#discussion_r1197162301
PR Review Comment: https://git.openjdk.org/jdk/pull/13528#discussion_r1197162518


More information about the kulla-dev mailing list