[
https://issues.apache.org/jira/browse/GROOVY-11384?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Eric Milles updated GROOVY-11384:
---------------------------------
Description:
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 by Groovy 3 or 4, prints "entry entry entry entry". With STC or SC
enabled, prints "entry true true true".
was:
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 by Groovy 3, prints "entry entry entry entry". With STC or SC
enabled, prints "entry true true true".
> STC: 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
> Reporter: Eric Milles
> Assignee: Eric Milles
> Priority: Major
>
> 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 by Groovy 3 or 4, prints "entry entry entry entry". With STC or SC
> enabled, prints "entry true true true".
--
This message was sent by Atlassian Jira
(v8.20.10#820010)