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"><<a href="mailto:kannan@cakoose.com">kannan@cakoose.com</a>></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'm not sure if this behavior is defined by the spec or a bug in the<br>
"javac" prototype:<br>
<br>
int x;<br>
{ =><br>
x = 1;<br>
System.out.println(x); // javac: variable x might not have been<br>
initialized<br>
}.invoke();<br>
<br>
<br>
I realize that 'x' shouldn't be considered definitely assigned after<br>
the closure. But it seems unintuitive that 'x' would not be<br>
definitely assigned inside the closure as well.<br>
<br>
(I compiled code from<br>
"<a href="http://hg.openjdk.java.net/closures/closures/langtools" target="_blank">http://hg.openjdk.java.net/closures/closures/langtools</a>" and ran<br>
"dist/boostrap/bin/javac -source 1.7".)<br>
<font color="#888888"><br>
- Kannan<br>
</font></blockquote></div><br>