[ https://issues.apache.org/jira/browse/GROOVY-6603?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Eric Milles updated GROOVY-6603: -------------------------------- Fix Version/s: 4.0.0-rc-3 > Static type checks for closure parameters of methods > ---------------------------------------------------- > > Key: GROOVY-6603 > URL: https://issues.apache.org/jira/browse/GROOVY-6603 > Project: Groovy > Issue Type: Improvement > Components: Static Type Checker > Affects Versions: 2.3.0-beta-1 > Reporter: Maxim Medvedev > Assignee: Eric Milles > Priority: Major > Fix For: 4.0.0-rc-3 > > > Static type checker should check calls to closure parameters with provided > @ClosureParams information: > {code} > @CompileStatic > void foo(@ClosureParams(value = FromString, options = "java.lang.Number") > Closure cl) { > cl("a") //Compilation should fail here > } > {code} > Of course, these checks are not applicable to reassigned parameters, but in > most cases closure parameters are not reassigned. -- This message was sent by Atlassian Jira (v8.20.1#820001)