[ https://issues.apache.org/jira/browse/GROOVY-9418?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Paul King closed GROOVY-9418. ----------------------------- > Why implicitly call of the inner class instance not allowed? > ------------------------------------------------------------ > > Key: GROOVY-9418 > URL: https://issues.apache.org/jira/browse/GROOVY-9418 > Project: Groovy > Issue Type: Bug > Components: groovy-runtime > Affects Versions: 2.4.18 > Reporter: gekm > Priority: Major > > A parent and inner child classes: > {code} > class Parent { > def name > def child = new Child() > def call() { > println('parent called') > } > } > class Child { > def call() { > println('child called') > } > } > {code} > Calling: > {code} > import base.Parent > parent = new Parent(name: 'parent') > parent() > parent.child.call() > parent.child() > {code} > output: > {noformat} > parent called > child called > Caught: groovy.lang.MissingMethodException: No signature of method: > base.Parent.child() is applicable for argument types: () values: [] > Possible solutions: call(), find(), find(groovy.lang.Closure), getChild(), > setChild(java.lang.Object), split(groovy.lang.Closure) > {noformat} -- This message was sent by Atlassian Jira (v8.20.10#820010)