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-8449) Inconsistency in accessing properties in @CompileStatic
Date Mon, 15 Jan 2018 14:06:00 GMT
Daniil Ovchinnikov created GROOVY-8449:
------------------------------------------

             Summary: Inconsistency in accessing properties in @CompileStatic
                 Key: GROOVY-8449
                 URL: https://issues.apache.org/jira/browse/GROOVY-8449
             Project: Groovy
          Issue Type: Bug
          Components: Static compilation
    Affects Versions: 2.4.13
            Reporter: Daniil Ovchinnikov


{code:title=bugs.groovy}
class Fields {
  def Field = "field"
  def getField() { "getter" }
}

@CompileStatic
def usageCompileStatic() {
  new Fields().Field
}

def usageCompileDynamic() {
  new Fields().Field
}

println usageCompileDynamic() // field
println usageCompileStatic() // getter{code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message