You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Richard Zhang (JIRA)" <ji...@apache.org> on 2017/05/15 13:33:04 UTC
[jira] [Created] (GROOVY-8190) CompileStatic cant infer type when
using map as map key
Richard Zhang created GROOVY-8190:
-------------------------------------
Summary: CompileStatic cant infer type when using map as map key
Key: GROOVY-8190
URL: https://issues.apache.org/jira/browse/GROOVY-8190
Project: Groovy
Issue Type: Bug
Affects Versions: 2.4.6
Reporter: Richard Zhang
open groovy console, paste code below
{code:groovy}
import groovy.transform.*
@CompileStatic
void foo(Map<Map<String, String>, List<Map<String, Object>>> map){
for(Map<String, String> key : map.keySet()) {
def x = map[key]
def y = x[0][""]
}
}
{code}
and you will see it fails to compile
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)