This sounds like it should be a bug.<br><br><div class="gmail_quote">On Thu, Jan 15, 2009 at 1:53 PM, Kannan Goundan <span dir="ltr">&lt;<a href="mailto:kannan@cakoose.com">kannan@cakoose.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I&#39;m not sure if this behavior is defined by the spec or a bug in the<br>
&quot;javac&quot; prototype:<br>
<br>
 &nbsp; int x;<br>
 &nbsp; { =&gt;<br>
 &nbsp; &nbsp; &nbsp;x = 1;<br>
 &nbsp; &nbsp; &nbsp;System.out.println(x); &nbsp;// javac: variable x might not have been<br>
initialized<br>
 &nbsp; }.invoke();<br>
<br>
<br>
I realize that &#39;x&#39; shouldn&#39;t be considered definitely assigned after<br>
the closure. &nbsp;But it seems unintuitive that &#39;x&#39; would not be<br>
definitely assigned inside the closure as well.<br>
<br>
(I compiled code from<br>
&quot;<a href="http://hg.openjdk.java.net/closures/closures/langtools" target="_blank">http://hg.openjdk.java.net/closures/closures/langtools</a>&quot; and ran<br>
&quot;dist/boostrap/bin/javac -source 1.7&quot;.)<br>
<font color="#888888"><br>
- Kannan<br>
</font></blockquote></div><br>