Mark-<br><br>This is definitely a bug.&nbsp; It should work the same with or without the qualification.<br><br>Thanks for the report!<br><br>Regards,<br>Neal<br><br><div class="gmail_quote">On Fri, Jun 20, 2008 at 2:06 AM, Mark Mahieu &lt;<a href="mailto:mark@twistedbanana.demon.co.uk">mark@twistedbanana.demon.co.uk</a>&gt; wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">This one&#39;s a minor niggle - a non-static generic inner class nested in another generic class cannot be instantiated from within a closure unless qualified with the enclosing type:<br>

<br>
<br>
class ImproperlyFormedType&lt;E&gt; {<br>
 &nbsp; &nbsp; &nbsp; &nbsp;<br>
 &nbsp; &nbsp; &nbsp; &nbsp;class Inner&lt;T&gt; {}<br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp;void makeInner() {<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;// this is ok<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;new Inner&lt;String&gt;();<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;// but not when wrapped in a closure<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{=&gt; new Inner&lt;String&gt;(); }.invoke();<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;// qualifying it solves the problem<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{=&gt; new ImproperlyFormedType&lt;E&gt;.Inner&lt;String&gt;(); }.invoke();<br>
 &nbsp; &nbsp; &nbsp; &nbsp;}<br>
}<br>
<br>
<br>
ImproperlyFormedType.java:11: improperly formed type, type parameters given on a raw type<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{=&gt; new Inner&lt;String&gt;(); }.invoke();<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ^<br>
1 error<br>
<br>
<br>
Regards,<br><font color="#888888">
<br>
Mark<br>
</font></blockquote></div><br>