java8: static method with body is allowed in interface (IDEA-100334)

This commit is contained in:
Anna Kozlova
2013-02-04 13:39:59 +04:00
parent e8c454f426
commit 68f7ee96f7
6 changed files with 57 additions and 6 deletions

View File

@@ -50,7 +50,7 @@ class D {
}
interface IllegalMods {
<error descr="Illegal combination of modifiers: 'static' and 'abstract'">static</error> void m1();
<error descr="Static methods in interfaces should have a body">static void m1()</error>;
<error descr="Illegal combination of modifiers: 'static' and 'default'">static</error> void m2() default { }
<error descr="Illegal combination of modifiers: 'static' and 'default'">static</error> <error descr="Illegal combination of modifiers: 'default' and 'static'">default</error> void m3() { }

View File

@@ -0,0 +1,4 @@
interface Foo {
public static void bar1() {}
public <error descr="Illegal combination of modifiers: 'abstract' and 'static'">abstract</error> static void bar2() {}
}