Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
Variation of GROOVY-9977. Consider the following:
@groovy.transform.TypeChecked def stc() { return (Comparator<Integer>) { a, b -> Integer.compare(a, b) } }
When casting or coercing a closure/lambda expression the type checker fails to infer the parameter types.
[Static type checking] - Cannot find matching method java.lang.Integer#compare(java.lang.Object, java.lang.Object). Please check if the declared type is correct and if the method exists.
Attachments
Issue Links
- relates to
-
GROOVY-10660 STC: infer closure/lambda parameter types for return expression
- Closed