[ https://issues.apache.org/jira/browse/GROOVY-10754?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17716719#comment-17716719 ]
Thodoris Sotiropoulos commented on GROOVY-10754: ------------------------------------------------ [~emilles]The master version of Groovy does compile this program. > Incompatible generic argument types when using wildcards > -------------------------------------------------------- > > Key: GROOVY-10754 > URL: https://issues.apache.org/jira/browse/GROOVY-10754 > Project: Groovy > Issue Type: Bug > Components: Static Type Checker > Reporter: Thodoris Sotiropoulos > Assignee: Eric Milles > Priority: Minor > > I have the following program > {code} > class A<T> {} > class B extends A<Boolean> {} > class C<T extends A<Boolean>, U extends T> { > C(T x, U v) {} > } > class Test { > void test(B x, B y) { > C<? extends B, ? extends B> z = new C<>(x, y); > } > } > {code} > h3. Actual behavior > {code} > org.codehaus.groovy.control.MultipleCompilationErrorsException: startup > failed: > test.groovy: 12: [Static type checking] - Incompatible generic argument > types. Cannot assign C<A<java.lang.Boolean>, B> to: C<? extends B, ? extends > B> > @ line 12, column 37. > C<? extends B, ? extends B> z = new C<>(x, y); > ^ > 1 error > {code} > h3. Expected behavior > Compile successfully > *Notes*: The bug happens only when the class named C has two type parameters, > and the second parameter is bounded to the first one > Tested against master (commit: 099cf5b3f0ca61ea5daa72ebcea66ef09a74fd84) -- This message was sent by Atlassian Jira (v8.20.10#820010)