[ 
https://issues.apache.org/jira/browse/GROOVY-8430?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Paul King resolved GROOVY-8430.
-------------------------------
       Resolution: Fixed
         Assignee: Paul King
    Fix Version/s: 2.5.0-beta-3

Proposed PR merged. Groovy 2_4_X never provided the setter (it was part of 
allowing CLI builder annotation enhancements to work with scripts - AKA 
{{@OptionField}}) so fix wasn't required for that branch.

> @Field doesn't support final fields
> -----------------------------------
>
>                 Key: GROOVY-8430
>                 URL: https://issues.apache.org/jira/browse/GROOVY-8430
>             Project: Groovy
>          Issue Type: Bug
>            Reporter: Paul King
>            Assignee: Paul King
>             Fix For: 2.5.0-beta-3
>
>
> We do slightly stricter checking of final modifiers for fields in 2.5 but 
> @Field has problems with code like this:
> {code}
> @Field final foo = 42
> {code}
> giving the error:
> {noformat}
> cannot modify final field 'foo' outside of constructor.
> {noformat}
> It turns out the {{setFoo}} method we create as a helper method shouldn't be 
> created for the final case.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to