[
https://issues.apache.org/jira/browse/GROOVY-12475?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Paul King resolved GROOVY-12475.
--------------------------------
Fix Version/s: 5.1.4
Resolution: Fixed
I have only done this for 6+. There is no reason we couldn't backport if it is
helpful for earlier Groovy versions.
> split property definition and PackageScope transform
> ----------------------------------------------------
>
> Key: GROOVY-12475
> URL: https://issues.apache.org/jira/browse/GROOVY-12475
> Project: Groovy
> Issue Type: Bug
> Components: Compiler
> Affects Versions: 4.0.33, 5.1.3, 6.0.0
> Reporter: Eric Milles
> Assignee: Paul King
> Priority: Major
> Fix For: 7.0.0-alpha-1, 6.0.1, 5.1.4
>
>
> Consider the following:
> {code:groovy}
> class C {
> def foo = 'bar'
> @groovy.transform.PackageScope Object foo
> }
> println new C().foo
> println new C().@foo
> println new C().getFoo()
> {code}
> Fails with "The field 'foo' is declared multiple times." And if I move "=
> 'bar'" to the field, I instead get "The split property definition named 'foo'
> must not have an initial value for both the field and the property."
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)