> From: "Angelos Bimpoudis" <[email protected]> > To: "amber-spec-experts" <[email protected]> > Sent: Thursday, January 26, 2023 11:36:53 AM > Subject: Draft JLS Spec about unnamed patterns and variables
> Dear experts, > The first draft of the JLS spec about unnamed patterns and variables > (https://openjdk.org/jeps/8294349) is available at: > https://cr.openjdk.java.net/~abimpoudis/unnamed/latest/ > Comments very much welcomed! > Angelos In 14.14.2, "If the header contains an unnamed local variable declaration ( [ https://cr.openjdk.java.net/~abimpoudis/unnamed/unnamed-20230123/specs/unnamed-jls.html#jls-6.1 | 6.1 ] ) then #n is an automatically generated identifier that is distinct from any other identifiers (automatically generated or otherwise) that are in scope ( [ https://cr.openjdk.java.net/~abimpoudis/unnamed/unnamed-20230123/specs/unnamed-jls.html#jls-6.3 | 6.3 ] ) at the point where the enhanced for statement occurs. Otherwise #n is the Identifier ." why #n can not be '_' if the header contains an unnamed local variable ? The rest looks good. Rémi
