You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Paul King (JIRA)" <ji...@apache.org> on 2018/12/17 07:53:00 UTC

[jira] [Updated] (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:all-tabpanel ]

Paul King updated GROOVY-6335:
------------------------------
    Summary: MissingPropertyException when private static property is used inside a nested closure and called from a child class  (was: MissingPropertyException when static property is used inside a nested closure and called from a child class)

> 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
(v7.6.3#76005)