[
https://issues.apache.org/jira/browse/GROOVY-11762?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18040680#comment-18040680
]
ASF GitHub Bot commented on GROOVY-11762:
-----------------------------------------
eric-milles merged PR #2339:
URL: https://github.com/apache/groovy/pull/2339
> callable property field shadowing
> ---------------------------------
>
> Key: GROOVY-11762
> URL: https://issues.apache.org/jira/browse/GROOVY-11762
> Project: Groovy
> Issue Type: Bug
> Affects Versions: 5.0.1
> Reporter: Eric Milles
> Assignee: Eric Milles
> Priority: Major
>
> One case missed by GROOVY-8283 is that of callable property. Consider the
> following:
> {code:groovy}
> import java.util.concurrent.Callable
> 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)