groovy-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniil Ovchinnikov (JIRA)" <j...@apache.org>
Subject [jira] [Created] (GROOVY-8448) Local variable is accessible via explicit this
Date Mon, 15 Jan 2018 13:22:00 GMT
Daniil Ovchinnikov created GROOVY-8448:
------------------------------------------

             Summary: 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


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

Mime
View raw message