[java] better error message on @interface throws/extends list not allowed (IDEA-350501)

GitOrigin-RevId: 1f89c42ac5ffda1d026f6e40cb922b08a095d1dc
This commit is contained in:
Bas Leijdekkers
2024-04-08 09:54:38 +00:00
committed by intellij-monorepo-bot
parent 01711f3ea2
commit 89c8dc03ed
4 changed files with 19 additions and 8 deletions
@@ -0,0 +1,9 @@
@interface Declarations <error descr="'extends' not allowed on @interface">extends</error> java.io.Serializable {
int x() <error descr="'throws' not allowed on @interface method">throws</error> IllegalArgumentException;
}
@interface Seconds <error descr="'permits' not allowed on @interface">permits</error> Declarations {
<error descr="@interface members may not have type parameters"><T></error> int y();
}
@interface Generic<error descr="@interface may not have type parameters"><T></error> {}