You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Paul King (Jira)" <ji...@apache.org> on 2020/12/07 22:10:04 UTC
[jira] [Closed] (GROOVY-9816) @AutoImplement does not consider
declared properties
[ https://issues.apache.org/jira/browse/GROOVY-9816?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Paul King closed GROOVY-9816.
-----------------------------
> @AutoImplement does not consider declared properties
> ----------------------------------------------------
>
> Key: GROOVY-9816
> URL: https://issues.apache.org/jira/browse/GROOVY-9816
> Project: Groovy
> Issue Type: Bug
> Affects Versions: 2.5.13, 3.0.6
> Reporter: Eric Milles
> Assignee: Eric Milles
> Priority: Minor
> Fix For: 2.5.14, 3.0.7, 4.0.0-alpha-2
>
> Time Spent: 20m
> Remaining Estimate: 0h
>
> Consider the following:
> {code:groovy}
> interface I {
> def getX()
> void setX(x)
> }
> @groovy.transform.AutoImplement
> class C implements I {
> def x
> }
> def c = new C()
> c.x = 123
> print c.x
> {code}
> This script outputs "null" instead of the expected "123". {{@AutoImplement}} is generating {{getX()}} and {{setX(x)}} methods in place of the canonical generated methods for the property {{x}}.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)