You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Eric Milles (Jira)" <ji...@apache.org> on 2022/05/12 16:13:00 UTC
[jira] [Updated] (GROOVY-10180) STC: instanceof and DGM each(Map,Closure)
[ https://issues.apache.org/jira/browse/GROOVY-10180?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Eric Milles updated GROOVY-10180:
---------------------------------
Fix Version/s: 3.0.11
> STC: instanceof and DGM each(Map,Closure)
> -----------------------------------------
>
> Key: GROOVY-10180
> URL: https://issues.apache.org/jira/browse/GROOVY-10180
> Project: Groovy
> Issue Type: Bug
> Components: Static Type Checker
> Affects Versions: 2.5.14, 3.0.8, 4.0.0-alpha-3
> Reporter: Eric Milles
> Assignee: Eric Milles
> Priority: Minor
> Fix For: 4.0.0-beta-1, 3.0.11
>
>
> Similar to GROOVY-10179, STC is not inferring the type of map entry through instanceof. Consider the following:
> {code:groovy}
> @groovy.transform.TypeChecked
> void test(args) {
> if (args instanceof Map) {
> args.each { e ->
> println "$e.key $e.value"
> }
> }
> }
> test(a:1,b:2,c:3.14)
> {code}
--
This message was sent by Atlassian Jira
(v8.20.7#820007)