You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Xiaotian Ma (Jira)" <ji...@apache.org> on 2025/01/07 02:12:00 UTC
[jira] [Created] (GROOVY-11548) Could not inherit class and interface where class has a final method overridden by interface
Xiaotian Ma created GROOVY-11548:
------------------------------------
Summary: Could not inherit class and interface where class has a final method overridden by interface
Key: GROOVY-11548
URL: https://issues.apache.org/jira/browse/GROOVY-11548
Project: Groovy
Issue Type: Bug
Components: Compiler
Affects Versions: 4.0.24
Environment: Tried on Linux and Windows, the same error.
Reporter: Xiaotian Ma
Fix For: 5.0.0-alpha-11
Compile following code.
```groovy
class A {
final public void func() {
}
}
interface I0 {
public default void func() {
}
}
class B extends A implements I0 {
}
```
Groovy 4.0.24:
```txt
A.groovy: -1: You are not allowed to override the final method func() from class 'A'.
@ line -1, column -1.
1 error
```
Groovy 5.0.0-alpha-11: passed
--
This message was sent by Atlassian Jira
(v8.20.10#820010)