Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
2.5.14, 3.0.7, 4.0.0-alpha-3
-
None
Description
Consider the following:
@groovy.transform.TypeChecked void test() { def list = ['x','y'] def map = list.<String,Object,String>collectEntries { [it, it.length()] } }
The type checker infers Map<K,V> for the type of "map" even though all type arguments are provided to "collectEntries".
public static <K,V,E> Map<K, V> collectEntries(Iterable<E> self, @ClosureParams(FirstParam.FirstGenericType.class) Closure<?> transform)