[ 
https://issues.apache.org/jira/browse/GROOVY-11384?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Paul King closed GROOVY-11384.
------------------------------

> STC: map property access within closure
> ---------------------------------------
>
>                 Key: GROOVY-11384
>                 URL: https://issues.apache.org/jira/browse/GROOVY-11384
>             Project: Groovy
>          Issue Type: Bug
>          Components: Static Type Checker
>    Affects Versions: 3.0.21, 5.0.0-alpha-8, 4.0.21
>            Reporter: Eric Milles
>            Assignee: Eric Milles
>            Priority: Major
>             Fix For: 3.0.22, 5.0.0-alpha-9, 4.0.22
>
>
> Consider the following:
> {code:groovy}
> void test(Map map) {
>   println map.empty
>   println map.with{ empty }
>   println map.with{ delegate.empty }
>   println map.with{ {->owner.empty}() }
> }
> test( [:].withDefault{ 'entry' } )
> {code}
> When run as-is, the script prints "entry entry entry entry".  With STC or SC 
> enabled, Groovy 3 or 4 prints "entry true true true".



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to