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

Jan Å mucr edited comment on GROOVY-5438 at 1/5/17 3:23 PM:
-----------------------------------------------------------

Just came across this issue as well (Groovy 2.4.7). It also makes threads with 
their body defined in superclass being unable to access superclass' private 
properties.


was (Author: bummer):
Just came across this issue as well. It also makes threads with their body 
defined in superclass being unable to access superclass' private properties.

> Private field inaccessible in closure when using a subclass
> -----------------------------------------------------------
>
>                 Key: GROOVY-5438
>                 URL: https://issues.apache.org/jira/browse/GROOVY-5438
>             Project: Groovy
>          Issue Type: Sub-task
>          Components: groovy-jdk
>    Affects Versions: 1.8.6
>            Reporter: Mathieu Bruyen
>            Priority: Minor
>         Attachments: reproduce.groovy
>
>
> If a class defines a private field and a method that uses a closures 
> referencing this private field, then a groovy.lang.MissingPropertyException 
> is thrown any time this method is called from a subclass.
> It can be reproduced in the groovy console with the script in attachment. If 
> "iterate" is called on the parent it works (text is appended to stdout - no 
> exception), but if it is called from the subclass it fails (only the text 
> from outside the closure is displayed and then an exception is thrown).
> This issue come from a deeper investigation on 
> http://groovy.329449.n5.nabble.com/Exception-when-extending-ASTTransformationCustomizer-td5630073.html



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to