Eric Milles created GROOVY-11384:
------------------------------------

             Summary: 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


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".



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

Reply via email to