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 2023/07/17 19:05: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=17743833#comment-17743833 ] 

Eric Milles edited comment on GROOVY-6335 at 7/17/23 7:04 PM:
--------------------------------------------------------------

https://github.com/apache/groovy/commit/18ab1b75d98510cca97af10f3531ad122d469293
https://github.com/apache/groovy/commit/439517a6f7917722871bdf926d55e8cbf48f3871


was (Author: emilles):
https://github.com/apache/groovy/commit/18ab1b75d98510cca97af10f3531ad122d469293

> 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
>            Reporter: Marcin Erdmann
>            Assignee: Eric Milles
>            Priority: Major
>             Fix For: 5.0.0-alpha-1
>
>
> 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.20.10#820010)