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

Paul King closed GROOVY-10309.
------------------------------

> Improper type variable substitution when involving type parameters with 
> conficting names
> ----------------------------------------------------------------------------------------
>
>                 Key: GROOVY-10309
>                 URL: https://issues.apache.org/jira/browse/GROOVY-10309
>             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 code
> {code:java}
> class A<T, Y> {
>   T f1;
>   Y f2;
>   A(T f1, Y f2) {
>     this.f1 = f1;
>     this.f2 = f2;
>   }
> }
> class C<T, X> {
>   void test() {
>     A<X, T> x = new A<X, T>((X) null, (T) null);
>   }
> }
> {code}
> h3. Actual behaviour
> {code}
> org.codehaus.groovy.control.MultipleCompilationErrorsException: startup 
> failed:
> test.groovy: 23: [Static type checking] - Cannot call A#<init>(X, T) with 
> arguments [X, T]
>  @ line 23, column 17.
>        A<X, T> x = new A<X, T>((X) null, (T) null);
>                    ^
> 1 error
> {code}
> h3. Expected behaviour
> Compile successfully
> Tested against master



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

Reply via email to