Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
3.0.17
-
None
Description
Consider the following:
void setStrategy(Predicate<Long> tester) { assert tester.test(1L) } strategy = { n -> n instanceof Long }
Compiler error: "Incompatible generic argument types. Cannot assign Predicate<Object> to Predicate<Long>"
Attachments
Issue Links
- is related to
-
GROOVY-11083 STC: closure param's default not type-checked (method target)
- Closed