[
https://issues.apache.org/jira/browse/GROOVY-10985?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Eric Milles reassigned GROOVY-10985:
------------------------------------
Assignee: Eric Milles
> Precedence of self property over outer class field
> --------------------------------------------------
>
> Key: GROOVY-10985
> URL: https://issues.apache.org/jira/browse/GROOVY-10985
> Project: Groovy
> Issue Type: Bug
> Reporter: Eric Milles
> Assignee: Eric Milles
> Priority: Major
>
> Consider the following:
> {code:groovy}
> class Outer {
> private static int VALUE = 1
> static class Inner {
> def getProperty(String name) {
> if (name == "VALUE") return 2
> }
> void test() {
> print VALUE
> }
> }
> }
> new Outer.Inner().test()
> {code}
> Expecting "2" but prints "1". If {{Inner}} provides a "generic" property via
> getProperty, get or via a Map interface it is not used.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)