Details
-
Bug
-
Status: Closed
-
Critical
-
Resolution: Fixed
-
1.7.0
-
None
Description
The following script compiles but when run, class loading fails saying "java.lang.VerifyError: class B overrides final method"
class A { def foo() {} final def bar() {} } class B extends A { def foo() {} def bar() {} } B
If I swap the order of method definitions in class B as:
class A { def foo() {} final def bar() {} } class B extends A { def bar() {} def foo() {} } B
then it correctly gives the error message "You are not allowed to overwrite the final method bar() from class 'A'."