Eric Milles created GROOVY-11368:
------------------------------------
Summary: SC: map access different for parameter and local variable
of same type
Key: GROOVY-11368
URL: https://issues.apache.org/jira/browse/GROOVY-11368
Project: Groovy
Issue Type: Bug
Components: Static compilation
Affects Versions: 3.0.21
Reporter: Eric Milles
Assignee: Eric Milles
Consider the following:
{code:groovy}
class C implements Map<String,String> {
@Delegate Map<String,String> impl = [:]
}
def map = new C()
assert map.entry == null
assert map.empty == null
assert map.class == null
assert map.metaClass == null
def test(C map) {
assert map.entry == null
assert map.empty == null
assert map.class == null
assert map.metaClass == null
}
test(new C())
{code}
The method-based test fails with "class" returning the map class. Something is
different for local variable and parameter property expressions.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)