mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
java 8: forbid super in static methods
This commit is contained in:
+13
@@ -0,0 +1,13 @@
|
||||
interface Super
|
||||
{
|
||||
default void method()
|
||||
{
|
||||
System.out.println("Super.method()");
|
||||
}
|
||||
}
|
||||
|
||||
interface Sub extends Super {
|
||||
static void foo() {
|
||||
<error descr="'Super' is not an enclosing class">Super.super</error>.method();
|
||||
}
|
||||
}
|
||||
+3
@@ -32,6 +32,9 @@ public class Interface8MethodsHighlightingTest extends LightDaemonAnalyzerTestCa
|
||||
public void testThisAccessibility() { doTest(false, false); }
|
||||
public void testStaticMethodCalls() { doTest(false, false); }
|
||||
public void testDefaultMethodOverrideEquivalentObject() { doTest(false, false); }
|
||||
public void testDefaultSupersInStaticContext() {
|
||||
doTest(false, false);
|
||||
}
|
||||
|
||||
private void doTest() {
|
||||
doTest(false, false);
|
||||
|
||||
Reference in New Issue
Block a user