Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.4.10
-
None
Description
import groovy.transform.CompileStatic import java.util.function.Predicate @CompileStatic static boolean foo(Predicate<? super String> p) { p.test("foo") } @CompileStatic static def testPredicate() { foo { // it -> it.toUpperCase() true } }
Uncomment it, compiler will say:
Cannot find matching method java.lang.Object#toUpperCase()
Attachments
Issue Links
- is duplicated by
-
GROOVY-6888 Static type checking fails if I change the closure input parameter name
- Closed
-
GROOVY-8476 Static type checking doesn't inference argument's type when it's explicitly declared
- Closed
- links to