Draft JLS Spec about unnamed patterns and variables
Remi Forax
forax at univ-mlv.fr
Thu Jan 26 13:29:20 UTC 2023
> From: "Angelos Bimpoudis" <angelos.bimpoudis at oracle.com>
> To: "amber-spec-experts" <amber-spec-experts at openjdk.java.net>
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/amber-spec-experts/attachments/20230126/db091b1a/attachment-0001.htm>
More information about the amber-spec-experts
mailing list