Slightly incorrect diagnostic

Neal Gafter neal at gafter.com
Thu May 15 14:07:17 PDT 2008


Thanks for the report.  I think I have the toString() reversed for
restricted versus unrestricted.

Regards,
Neal

On Thu, May 15, 2008 at 2:05 PM, Mark Mahieu <mark at twistedbanana.demon.co.uk>
wrote:

> I've found another example where the compiler gives a slightly misleading
> compilation error:
>
>
> public class WrongType {
>
>    public static void main(String[] args) {
>        {=>}.invoke(1);
>    }
> }
>
>
> The message refers to an unrestricted type, yet I only have a restricted
> closure:
>
> WrongType.java:4: invoke() in { ==> void} cannot be applied to (int)
>                {=>}.invoke(1);
>                    ^
> 1 error
>
>
>
> Regards,
>
> Mark
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/closures-dev/attachments/20080515/5d411987/attachment.html 


More information about the closures-dev mailing list