Files
openide/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/EnumWithAbstractMethods.java
Nikita Eshkeev 61712f77ac [codeInsight] IDEA-236735 Java enum constant is called "Anonymous inner class"
There used to be a vague error message for enum constants that don't
implement methods from an interface which refers to them as
'Anonymous class deriving from *Enum'. This patch makes the message clear
displaying the real names of the enum constants in the error message.

Signed-off-by: Nikita Eshkeev <nikita.eshkeev@jetbrains.com>

GitOrigin-RevId: 700bc2b579e0c8552858ab881d9a3e4e8d81b1f8
2020-04-24 15:29:10 +00:00

25 lines
579 B
Java

<error descr="Modifier 'abstract' not allowed here">abstract</error> enum OurEnum {
<error descr="Enum constant 'A' must implement abstract method 'foo()' in 'OurEnum'">A</error> {
},
<error descr="'OurEnum' is abstract; cannot be instantiated">B</error>,
C {
void foo() {}
}
;
abstract void foo();
}
enum xxx {
<error descr="'xxx' is abstract; cannot be instantiated">X</error>,
<error descr="Enum constant 'Y' must implement abstract method 'f()' in 'xxx'">Y</error> {
};
abstract void f();
}
enum ok {
X { void f() {} };
abstract void f();
}