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 16:30:00 UTC

[jira] [Resolved] (GROOVY-10675) Covariant override method regression

     [ https://issues.apache.org/jira/browse/GROOVY-10675?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eric Milles resolved GROOVY-10675.
----------------------------------
    Fix Version/s: 5.0.0-alpha-1
       Resolution: Fixed

https://github.com/apache/groovy/commit/74f4fd4b25a57b8370345cbb1bd50b1d657cb3e7

> 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
>            Priority: Major
>             Fix For: 5.0.0-alpha-1
>
>
> 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)