groovy-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul King (JIRA)" <j...@apache.org>
Subject [jira] [Closed] (GROOVY-6659) generic bounds ignored by type checking
Date Tue, 02 May 2017 02:03:06 GMT

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

Paul King closed GROOVY-6659.
-----------------------------

> generic bounds ignored by type checking
> ---------------------------------------
>
>                 Key: GROOVY-6659
>                 URL: https://issues.apache.org/jira/browse/GROOVY-6659
>             Project: Groovy
>          Issue Type: Bug
>          Components: Static compilation, Static Type Checker
>    Affects Versions: 2.3.0, 2.2.3, 2.4.0-beta-3
>            Reporter: Jochen Theodorou
>             Fix For: 2.5.0-alpha-1
>
>
> {code:Java}
> class A{}
> class B{}
> @groovy.transform.CompileStatic
> class Helper<V extends A> {
>            public Helper(Closure<V> cl) {}
>        }
> @groovy.transform.CompileStatic
>        static <C extends B> void extensionMethod(Closure<C> cl) {
>            new Helper<C>(cl)
>        }
> {code}
> The example is inspired by the fix done for GROOVY-6657, not sure versions before are
affected, since this kind of code failed before. So it might be seen as regression.
> Anyway, the code above should not compile, since Helper cannot extend A and B at the
same time.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message