Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
-
None
Description
Consider the following:
@groovy.transform.TypeChecked void test() { Map<String,Object> map = [foo:'bar'] map*.value = 'baz' // Incompatible generic argument types. Cannot assign java.util.List<java.lang.String> to: java.util.List<java.lang.Object> }
I believe this assignment should work since the RHS string is indeed an Object. Not sure if the LHS type should be List<? extends Object> or the RHS type should be List<? super String>.