Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.1.5
-
None
Description
For some reason, in the following code, the inject method is not recognized by the type checker:
@groovy.transform.TypeChecked def foo() { [milk: [1,1.0], croissant:[4,0.85]].inject(0) { int sum, Map.Entry<String,List> entry -> List<? extends Number> v = entry.value sum += v[0]*v[1] sum } } foo()