Java: improve error message - repeated modifier (IDEA-330995)

GitOrigin-RevId: c2e4ddef81f2df01c0cd16ebc989f8130d255056
This commit is contained in:
Bas Leijdekkers
2023-11-01 16:15:17 +00:00
committed by intellij-monorepo-bot
parent 378f251ba2
commit 13826505b1
12 changed files with 73 additions and 54 deletions
@@ -53,9 +53,9 @@ interface IllegalMods {
void m1()<error descr="'{' or ';' expected"> </error>default<error descr="Identifier or type expected">;</error> <error descr="Not allowed in interface">{ }</error>
<error descr="Static methods in interfaces should have a body">static void m2()</error>;
<error descr="Illegal combination of modifiers: 'static' and 'default'">static</error> <error descr="Illegal combination of modifiers: 'default' and 'static'">default</error> void m3() { }
<error descr="Illegal combination of modifiers 'static' and 'default'">static</error> <error descr="Illegal combination of modifiers 'default' and 'static'">default</error> void m3() { }
<error descr="Illegal combination of modifiers: 'abstract' and 'default'">abstract</error> <error descr="Illegal combination of modifiers: 'default' and 'abstract'">default</error> void m4() { }
<error descr="Illegal combination of modifiers 'abstract' and 'default'">abstract</error> <error descr="Illegal combination of modifiers 'default' and 'abstract'">default</error> void m4() { }
<error descr="Extension method should have a body">default void m5()</error>;
@@ -1,4 +1,4 @@
interface Foo {
public static void bar1() {}
public <error descr="Illegal combination of modifiers: 'abstract' and 'static'">abstract</error> static void bar2() {}
public <error descr="Illegal combination of modifiers 'abstract' and 'static'">abstract</error> static void bar2() {}
}