[
https://issues.apache.org/jira/browse/GROOVY-10267?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Eric Milles updated GROOVY-10267:
---------------------------------
Fix Version/s: (was: 5.0.0-alpha-1)
> 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
> Fix For: 2.5.17, 3.0.11, 4.0.2
>
>
> 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.10#820010)