Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Duplicate
-
2.2.1
-
None
-
None
Description
@CompileStatic class CompileStaticTest { void requiresString(String s) { println(s) } void showsError() { List<String> ls = ["a", "b"] ls.each {requiresString(it)} } }
Yields compiler error:
Groovyc: [Static type checking] - Cannot find matching method com.<pathdeleted>.CompileStaticTest#requiresString(java.lang.Object). Please check if the declared type is right and if the method exists.
Attachments
Issue Links
- depends upon
-
GROOVY-5924 Provide a mechanism to allow the type checker to know what are the expected argument types of a closure
- Closed