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

Eric Milles resolved GROOVY-11384.
----------------------------------
    Fix Version/s: 3.0.22
       Resolution: Fixed

https://github.com/apache/groovy/commit/afc9a74f4f7523ad7fcde5e00dae9c5905a33c33

> 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, 4.0.21
>            Reporter: Eric Milles
>            Assignee: Eric Milles
>            Priority: Major
>             Fix For: 3.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, 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