groovy-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shil Sinha (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (GROOVY-7849) Incompatible covariant array return type
Date Sun, 05 Jun 2016 13:32:59 GMT

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

Shil Sinha updated GROOVY-7849:
-------------------------------
    Fix Version/s:     (was: 2.5.0-beta-1)
                   2.4.8

> Incompatible covariant array return type
> ----------------------------------------
>
>                 Key: GROOVY-7849
>                 URL: https://issues.apache.org/jira/browse/GROOVY-7849
>             Project: Groovy
>          Issue Type: Bug
>          Components: Compiler
>    Affects Versions: 2.4.6
>            Reporter: Daniil Ovchinnikov
>            Assignee: Shil Sinha
>             Fix For: 2.4.8
>
>
> Probably duplicates/is related to GROOVY-7185.
> Consider the snippet:
> {code}
> interface Base {}
> interface Derived extends Base {}
> interface I {
>   Base[] foo()
> }
> interface I2 extends I {
>   Derived[] foo()
> }
> class C implements I2 {
>   Derived[] foo() { null }
> }
> {code}
> Compilation fails with:
> {noformat}
> The return type of Derived[] foo() in C is incompatible with Base[] in I
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message