You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Eric Milles (Jira)" <ji...@apache.org> on 2021/10/30 19:01:00 UTC
[jira] [Assigned] (GROOVY-10309) Improper type variable
substitution when involving type parameters with conficting names
[ https://issues.apache.org/jira/browse/GROOVY-10309?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Eric Milles reassigned GROOVY-10309:
------------------------------------
Assignee: Eric Milles
> 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
>
> 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.3.4#803005)