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 2022/02/05 19:14:00 UTC

[jira] [Commented] (GROOVY-8448) Local variable is accessible via explicit this

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

Eric Milles commented on GROOVY-8448:
-------------------------------------

https://github.com/apache/groovy/pull/1682

> Local variable is accessible via explicit this
> ----------------------------------------------
>
>                 Key: GROOVY-8448
>                 URL: https://issues.apache.org/jira/browse/GROOVY-8448
>             Project: Groovy
>          Issue Type: Bug
>    Affects Versions: 2.4.13
>            Reporter: Daniil Ovchinnikov
>            Assignee: Eric Milles
>            Priority: Major
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> {code:groovy}
> def var = "local var"
> new Runnable() {
>   def getVar() { "getter" }
>   void run() {
>     println var // as expected: local var
>     println this.var // expected: getter, actual: local var
>   }
> }.run()
> {code}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)