<div dir="ltr"><div>Hi Stephan,</div><div><br></div><div>It turns out that this bug is already fixed, but this fix is still waiting in the PR hopper...</div><div><br></div><div>I've resolved it as a duplicate of <a href="https://bugs.openjdk.org/browse/JDK-8334248" title="Invalid error for early construction local class constructor method reference" class="gmail-issue-link">JDK-8334248</a>.</div><div><br></div><div>FYI here is the <a href="https://bugs.openjdk.org/browse/JDK-8334248?jql=labels%20%3D%20javac-pre-capture%20ORDER%20BY%20status%20ASC">list of bugs related to this early initialization stuff</a>.</div><div><br></div><div>-Archie<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jul 11, 2024 at 8:56 AM Archie Cobbs <<a href="mailto:archie.cobbs@gmail.com">archie.cobbs@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr">On Thu, Jul 11, 2024 at 6:01 AM Stephan Herrmann <<a href="mailto:stephan.herrmann@berlin.de" target="_blank">stephan.herrmann@berlin.de</a>> wrote:</div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Using javac from build 23-ea+30-2323 this compiles fine and prints "f1f1f1f3".<br>
<br>
When, however, I enable the innermost access to f1, javac complains:<br>
<br>
   error: no enclosing instance of type C1 is in scope<br>
<br>
Is this a bug, or am I missing some subtlety from the spec?<br></blockquote><div><br></div>You're right, I think that's a bug - thanks.</div><div class="gmail_quote"><br></div><div class="gmail_quote"><a href="https://bugs.openjdk.org/browse/JDK-8336255" target="_blank">https://bugs.openjdk.org/browse/JDK-8336255</a></div><div class="gmail_quote"><br></div><div class="gmail_quote">-Archie<br></div><br><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature">Archie L. Cobbs<br></div></div>
</blockquote></div><br clear="all"><br><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature">Archie L. Cobbs<br></div>