Mark-<br><br>This is definitely a bug. 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 <<a href="mailto:mark@twistedbanana.demon.co.uk">mark@twistedbanana.demon.co.uk</a>> 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'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<E> {<br>
<br>
class Inner<T> {}<br>
<br>
void makeInner() {<br>
<br>
// this is ok<br>
new Inner<String>();<br>
<br>
// but not when wrapped in a closure<br>
{=> new Inner<String>(); }.invoke();<br>
<br>
// qualifying it solves the problem<br>
{=> new ImproperlyFormedType<E>.Inner<String>(); }.invoke();<br>
}<br>
}<br>
<br>
<br>
ImproperlyFormedType.java:11: improperly formed type, type parameters given on a raw type<br>
{=> new Inner<String>(); }.invoke();<br>
^<br>
1 error<br>
<br>
<br>
Regards,<br><font color="#888888">
<br>
Mark<br>
</font></blockquote></div><br>