Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
Description
Consider the following:
@groovy.transform.TypeChecked class C { Map<String,Object> map void test(Map<? extends String, ?> m) { map.putAll(m) } }
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, ?>]
Attachments
Issue Links
- is related to
-
GROOVY-6095 Static checker fails on correct code
- Closed
-
GROOVY-9338 STC: no error for incorrect bounds match
- Closed
-
GROOVY-10267 STC reports wrong message when encoutering wildcard types
- Closed