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] [Commented] (GROOVY-8449) Inconsistency in accessing properties in @CompileStatic
Date Mon, 15 Jan 2018 14:08:00 GMT

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

Daniil Ovchinnikov commented on GROOVY-8449:
--------------------------------------------

Please confirm this is intended behaviour or clarify which of these cases should be fixed.

> 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
>            Priority: Major
>
> {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