mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-08 23:39:39 +07:00
TypeName::Identifier method reference applicability when TypeName denotes interface
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
interface I {
|
||||
default void a() {}
|
||||
}
|
||||
|
||||
interface J extends I {}
|
||||
|
||||
class A implements I {}
|
||||
class B extends A {}
|
||||
class C implements J {}
|
||||
|
||||
class Test1 implements I { { Runnable r = I.super::a; } }
|
||||
class Test2 implements J { { Runnable r = <error descr="'I' is not an enclosing class">I.super</error>::a; } }
|
||||
class Test3 implements I, J { { Runnable r = <error descr="Bad type qualifier in default super call: redundant interface I is extended by J">I</error>.super::a; } }
|
||||
class Test5 extends A implements I { { Runnable r = I.super::a; } }
|
||||
class Test6 extends A implements J { { Runnable r = <error descr="'I' is not an enclosing class">I.super</error>::a; } }
|
||||
class Test7 extends B { { Runnable r = <error descr="'I' is not an enclosing class">I.super</error>::a; } }
|
||||
class Test8 extends C { { Runnable r = <error descr="'I' is not an enclosing class">I.super</error>::a; } }
|
||||
|
||||
class Test {
|
||||
{
|
||||
class LocalJ implements I {
|
||||
}
|
||||
class Test3 extends LocalJ implements I {
|
||||
{
|
||||
Runnable r = I.super::a;
|
||||
}
|
||||
}
|
||||
|
||||
new I() {
|
||||
{
|
||||
Runnable r = I.super::a;
|
||||
}
|
||||
};
|
||||
|
||||
new A() {
|
||||
{
|
||||
Runnable r = <error descr="'I' is not an enclosing class">I.super</error>::a;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user