Eric Milles created GROOVY-10576:
------------------------------------
Summary: STC: map putAll fails to match "?" to "Object"
Key: GROOVY-10576
URL: https://issues.apache.org/jira/browse/GROOVY-10576
Project: Groovy
Issue Type: Bug
Components: Static Type Checker
Reporter: Eric Milles
Assignee: Eric Milles
Consider the following:
{code:groovy}
@groovy.transform.TypeChecked
class C {
Map<String,Object> map
void test(Map<? extends String, ?> m) {
map.putAll(m)
}
}
{code}
{{javac}} allows {{putAll}} in this situation. {{groovyc}} emits an error:
Cannot call {{java.util.Map#putAll(java.util.Map<? extends java.lang.String, ?
extends java.lang.Object>)}} with arguments {{[java.util.Map<? extends
java.lang.String, ?>]}}
--
This message was sent by Atlassian Jira
(v8.20.1#820001)