Last active
August 29, 2015 14:11
-
-
Save jeffscottbrown/652af416d83cd8a039f5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package demo | |
| import groovy.transform.CompileStatic | |
| @CompileStatic | |
| class Demo { | |
| void doit() { | |
| def c = { | |
| Map<String, String> data = [:] | |
| Map<String, Set<String>> otherData = [:] | |
| // GGTS marks the call to data.each with the following error... | |
| // Groovy:[Static type checking] - Cannot call <K,V> java.util.LinkedHashMap <java.lang.String, java.lang.String>#each(groovy.lang.Closure <java.lang.String>) | |
| // with arguments [groovy.lang.Closure <java.util.Set>] | |
| data.each { String k, String v -> | |
| // commenting out the following line allows the code to compile... | |
| def foo = otherData.get(k) | |
| } | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment