Follow up from
GROOVY-10277. Consider the following:
Instead of an error for mismatched generics – which was the previous disposition of the compiler – there could be an error for each typed parameter that does not match expectations. ecj produces the following error for the above's Java equivalent: "Lambda expression's parameter one is expected to be of type Integer"
These checks should extend to lambdas or closures that are cast, coerced or passed as arguments.