Description
Consider the following:
final enum E { FOO; E(int i) { super() } }
- Explicit abstract or final modifier is supposed to be an error because an enum is made abstract or final depending on what's declared: "It is a compile-time error if an enum declaration has the modifier abstract or final." https://docs.oracle.com/javase/specs/jls/se11/html/jls-8.html#jls-8.9
- The enum constant declaration "FOO" does not supply an argument, which results in a runtime error.
- The special constructor call "super()" is not allowed by Java and results in a runtime error in Groovy. "It is a compile-time error if a constructor declaration in an enum declaration contains a superclass constructor invocation statement (ยง8.8.7.1)."