You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Daniil Ovchinnikov (JIRA)" <ji...@apache.org> on 2018/01/15 14:08:00 UTC

[jira] [Commented] (GROOVY-8449) Inconsistency in accessing properties in @CompileStatic

    [ 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)