You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This test case produces the error for trying to override a final method. In the Java Editor, there is a quick fix provided: "Remove 'final' modifier of 'Foo.meth'(..)"
@TestpublicvoidtestOverriding_FinalMethod1() {
runNegativeTest(newString[] {
"Bar.groovy",
"class Bar {\n" +
" final def getFinalProperty() {}\n" +
"}\n",
"Foo.groovy",
"class Foo extends Bar {\n" +
" def getFinalProperty() {}\n" +
"}\n",
},
"----------\n" +
"1. ERROR in Foo.groovy (at line 2)\n" +
"\tdef getFinalProperty() {}\n" +
"\t ^^^^^^^^^^^^^^^^\n" +
"Groovy:You are not allowed to override the final method getFinalProperty() from class 'Bar'.\n" +
"----------\n");
}
The text was updated successfully, but these errors were encountered:
- Errors on constructor/method declarations should cover parameter list
- Move sourceEnds table population to GroovyCompilationUnitDeclaration
- TODO: Should enum constants with a body get the same treatment?
#611#612
This test case produces the error for trying to override a final method. In the Java Editor, there is a quick fix provided: "Remove 'final' modifier of 'Foo.meth'(..)"
The text was updated successfully, but these errors were encountered: