Closure conversion vs inherited and redeclared method
Neal Gafter
neal at gafter.com
Mon Jul 7 01:12:14 PDT 2008
Mark-
Sorry to take so long to respond to this. This definitely looks like a
bug. Thanks for letting me know. I'll have it fixed shortly.
Regards,
Neal
On Thu, May 15, 2008 at 2:57 PM, Mark Mahieu <mark at twistedbanana.demon.co.uk>
wrote:
> Closure conversion doesn't seem to work correctly when the target interface
> type inherits its single method and redeclares it:
>
>
> public class Redeclared {
>
> interface Foo1 {
> void foo();
> }
>
> interface Foo2 extends Foo1 {
> void foo();
> }
>
> public static void main(String[] args) {
> Foo1 foo1 = {=>};
> Foo2 foo2 = {=>};
> }
> }
>
>
>
> Redeclared.java:13: incompatible types
> found : { => void}
> required: Redeclared.Foo2
> Foo2 foo2 = {=>};
> ^
> 1 error
>
>
>
> Regards,
>
> Mark
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/closures-dev/attachments/20080707/3cde2bf4/attachment.html
More information about the closures-dev
mailing list