[ 
https://issues.apache.org/jira/browse/GROOVY-6659?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15535282#comment-15535282
 ] 

Jochen Theodorou commented on GROOVY-6659:
------------------------------------------

set to 2.5 beta 1

> 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-beta-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.4#6332)

Reply via email to