<html><body><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt; color: #000000"><div><br></div><div><br></div><hr id="zwchr" data-marker="__DIVIDER__"><div data-marker="__HEADERS__"><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><b>From: </b>"Angelos Bimpoudis" <angelos.bimpoudis@oracle.com><br><b>To: </b>"amber-spec-experts" <amber-spec-experts@openjdk.java.net><br><b>Sent: </b>Thursday, January 26, 2023 11:36:53 AM<br><b>Subject: </b>Draft JLS Spec about unnamed patterns and variables<br></blockquote></div><div><style style="display:none;"> P {margin-top:0;margin-bottom:0;} </style></div><div data-marker="__QUOTED_TEXT__"><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;">
<div style="font-family: "Segoe UI", "Segoe UI ", "Helvetica Neue", sans-serif; font-size: 11pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof ContentPasted0">
Dear experts,</div>
<div style="font-family: "Segoe UI", "Segoe UI ", "Helvetica Neue", sans-serif; font-size: 11pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof ContentPasted0">
<div><br class="ContentPasted0">
</div>
<div class="ContentPasted0">The first draft of the JLS spec about unnamed patterns and variables (https://openjdk.org/jeps/8294349) is available at:</div>
<div><br class="ContentPasted0">
</div>
<div class="ContentPasted0">https://cr.openjdk.java.net/~abimpoudis/unnamed/latest/</div>
<div><br class="ContentPasted0">
</div>
<div class="ContentPasted0">Comments very much welcomed!</div>
Angelos<br>
</div></blockquote><div><br></div><div>In 14.14.2,</div><div>"If the header contains an unnamed local variable declaration (<a href="https://cr.openjdk.java.net/~abimpoudis/unnamed/unnamed-20230123/specs/unnamed-jls.html#jls-6.1" data-mce-href="https://cr.openjdk.java.net/~abimpoudis/unnamed/unnamed-20230123/specs/unnamed-jls.html#jls-6.1">6.1</a>) then <code>#n</code> is an automatically generated identifier that is distinct from any other identifiers (automatically generated or otherwise) that are in scope (<a href="https://cr.openjdk.java.net/~abimpoudis/unnamed/unnamed-20230123/specs/unnamed-jls.html#jls-6.3" data-mce-href="https://cr.openjdk.java.net/~abimpoudis/unnamed/unnamed-20230123/specs/unnamed-jls.html#jls-6.3">6.3</a>) at the point where the enhanced <code>for</code> statement occurs. Otherwise <code>#n</code> is the <code>Identifier</code>."<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>why #n can not be '_' if the header contains an unnamed local variable ?<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>The rest looks good.<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>RĂ©mi<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div></div></div></body></html>