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

Paul King closed GROOVY-10283.
------------------------------

> Cannot assign type parameter whose bound is a parameterized type that takes a 
> wildcard
> --------------------------------------------------------------------------------------
>
>                 Key: GROOVY-10283
>                 URL: https://issues.apache.org/jira/browse/GROOVY-10283
>             Project: Groovy
>          Issue Type: Bug
>          Components: Static Type Checker
>            Reporter: Thodoris Sotiropoulos
>            Assignee: Eric Milles
>            Priority: Major
>             Fix For: 4.0.0-beta-2
>
>
> I have the following program
> {code:java}
> class A<T1, T2> {}
> class B<T1 extends Number, T2 extends A<C, ? extends T1>> {
>   T2 f;
>   B(T2 f) {
>     this.f  = f;
>   }
> }
> class C {}
> {code}
> h3. Actual behavior
> {code}
> org.codehaus.groovy.control.MultipleCompilationErrorsException: startup 
> failed:
> test.groovy: 7: [Static type checking] - Cannot assign value of type A<C, ? 
> extends java.lang.Number<T1 extends java.lang.Number>> to variable of type T2
>  @ line 7, column 15.
>        this.f  = f;
>                  ^
> 1 error
> {code}
> h3. Expected behavior
> Compile successfully
> Tested against master



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to