You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Eric Milles (Jira)" <ji...@apache.org> on 2022/07/02 14:46:00 UTC
[jira] [Created] (GROOVY-10675) Covariant override method regression
Eric Milles created GROOVY-10675:
------------------------------------
Summary: Covariant override method regression
Key: GROOVY-10675
URL: https://issues.apache.org/jira/browse/GROOVY-10675
Project: Groovy
Issue Type: Bug
Affects Versions: 5.0.0-alpha-1, 4.0.4
Reporter: Eric Milles
Assignee: Eric Milles
Consider the following:
{code:groovy}
@FunctionalInterface
interface A<I, O> {
O apply(I in)
}
interface B<X, Y> extends A<X, Y> {
}
class C implements B<Number, String> {
@Override String apply(Number n) { '' }
}
{code}
Error ""Method 'apply' from class 'C' does not override method from its superclass or interfaces but is annotated with @Override."
--
This message was sent by Atlassian Jira
(v8.20.10#820010)