[
https://issues.apache.org/jira/browse/GROOVY-10267?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17530445#comment-17530445
]
Thodoris Sotiropoulos commented on GROOVY-10267:
------------------------------------------------
I think this bug has been fixed as part of GROOVY-10576, [~emilles] hasn't it?
> STC reports wrong message when encoutering wildcard types
> ---------------------------------------------------------
>
> Key: GROOVY-10267
> URL: https://issues.apache.org/jira/browse/GROOVY-10267
> Project: Groovy
> Issue Type: Bug
> Components: Static Type Checker
> Reporter: Thodoris Sotiropoulos
> Assignee: Eric Milles
> Priority: Major
>
> I have the following program
> {code:java}
> class A<T> {
> }
> class B {
> A<? extends Object> test() {
> return test2();
> }
> A<? extends Object> test2() {
> return null;
> }
> }
> {code}
> h3. Actual behaviour
> {code:java}
> org.codehaus.groovy.control.MultipleCompilationErrorsException: startup
> failed:
> test.groovy: 6: [Static type checking] - Incompatible generic argument types.
> Cannot assign A<?> to: A<? extends java.lang.Object>
> @ line 6, column 12.
> return test2();
> ^1 error
> {code}
> h3. Expected behaviour
> Compile successfully
> Tested against master
--
This message was sent by Atlassian Jira
(v8.20.7#820007)