Superinterface.this.method()

bitter_fox bitterfoxc at gmail.com
Sat Dec 17 19:12:06 PST 2011


interface A
{
    public void a() default
    {
        System.out.println("A");
    }
}

class B implements A
{
    public void a()
    {
        A.this.a(); // "A" or StackOverflowError?
    }
}

I can compile this.(Revision is 1245)
Should "A.this.a()" be permitted?

If it should be permitted, does it mean "this.a()"?
(If "A.this.a()" would mean "this.a()", "Superinterface.this.method()" is
very unnecessary and misleading. Isn't it?)

Was this already discussed?

Thanks,
bitter_fox


More information about the lambda-dev mailing list