Eric Milles created GROOVY-11762:
------------------------------------
Summary: callable property field shadowing
Key: GROOVY-11762
URL: https://issues.apache.org/jira/browse/GROOVY-11762
Project: Groovy
Issue Type: Bug
Reporter: Eric Milles
One case missed by GROOVY-8283 is that of callable property. Consider the
following:
{code:groovy}
class A {
Callable getThing() {
return { println "call A" }
}
}
class B extends A {
protected Callable thing = { println "call B" }
}
class C extends B {
void test() {
thing()
}
}
new C().test()
{code}
This prints "call A". However, the rules established in 8283 suggest it should
print "call B".
--
This message was sent by Atlassian Jira
(v8.20.10#820010)