[
https://issues.apache.org/jira/browse/GROOVY-10220?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Paul King closed GROOVY-10220.
------------------------------
> Unexpected type mismatch when having conflicting type parameter names
> ---------------------------------------------------------------------
>
> Key: GROOVY-10220
> URL: https://issues.apache.org/jira/browse/GROOVY-10220
> 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 Groovy program
>
> {code:java}
> class A<X, T extends Number> {}
> class B<T> {
> A<? extends T, Number> x;
> B(A<? extends T, Number> x) {
> this.x = x;
> }
> }
> {code}
> h3. Actual Behaviour
>
> {code:java}
> org.codehaus.groovy.control.MultipleCompilationErrorsException: startup
> failed:
> test.groovy: 5: [Static type checking] - Incompatible generic argument types.
> Cannot assign A<java.lang.Object, java.lang.Number> to: A<? extends T,
> java.lang.Number>
> @ line 5, column 14.
> this.x = x;
> ^1 error
> {code}
> h3. Expected Behaviour
> Compile successfully
>
> Tested against master
>
>
>
>
--
This message was sent by Atlassian Jira
(v8.20.1#820001)