Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.0.0
-
Ubuntu 12.04, Oracle JDK 1.7.0_05-b05
Description
The following code (from Map#each documentation in the Groovy JDK) fails under static compilation:
import groovy.transform.CompileStatic @CompileStatic def test() { def result = "" [a:1, b:3].each { key, value -> result += "$key$value" } assert result == "a1b3" } test()
with the message:
Caught: groovy.lang.MissingMethodException: No signature of method: mapeach$_test_closure1.doCall() is applicable for argument types: (java.util.LinkedHashMap$Entry) values: [a=1] Possible solutions: doCall(java.lang.Object, java.lang.Object), findAll(), findAll(), isCase(java.lang.Object), isCase(java.lang.Object) groovy.lang.MissingMethodException: No signature of method: mapeach$_test_closure1.doCall() is applicable for argument types: (java.util.LinkedHashMap$Entry) values: [a=1] Possible solutions: doCall(java.lang.Object, java.lang.Object), findAll(), findAll(), isCase(java.lang.Object), isCase(java.lang.Object) at mapeach.test(mapeach.groovy:5) at mapeach.run(mapeach.groovy:8)