You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Eric Milles (Jira)" <ji...@apache.org> on 2021/03/17 23:15:00 UTC

[jira] [Comment Edited] (GROOVY-6335) MissingPropertyException when private static property is used inside a nested closure and called from a child class

    [ https://issues.apache.org/jira/browse/GROOVY-6335?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17303765#comment-17303765 ] 

Eric Milles edited comment on GROOVY-6335 at 3/17/21, 11:14 PM:
----------------------------------------------------------------

See also GROOVY-9987, GROOVY-8905, GROOVY-5438, GROOVY-5051 and GROOVY-2433


was (Author: emilles):
See also GROOVY-9987, GROOVY-8905, GROOVY-5438 and GROOVY-5051

> MissingPropertyException when private static property is used inside a nested closure and called from a child class
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: GROOVY-6335
>                 URL: https://issues.apache.org/jira/browse/GROOVY-6335
>             Project: Groovy
>          Issue Type: Bug
>          Components: groovy-runtime
>    Affects Versions: 2.1.2, 2.4.0-rc-1
>            Reporter: Marcin Erdmann
>            Priority: Major
>
> The folowing throws a MissingPropertyException:
> {code}
> import groovy.util.logging.*
> @Log
> class A {
>     void logSth() {
>         2.times { 1.times { log.info 'sth' } }
>     }
> }
> class B extends A {}
> new B().logSth()
> {code}
> Note that exception is not thrown if the method is called on the parent class ({{new A().logSth()}}) and if log property is accessed from a non-nested closure.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)