[ https://issues.apache.org/jira/browse/GROOVY-11368?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Paul King closed GROOVY-11368. ------------------------------ > 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, 4.0.21 > Reporter: Eric Milles > Assignee: Eric Milles > Priority: Major > Fix For: 3.0.22, 4.0.22 > > > 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)