groovy-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (GROOVY-8430) @Field doesn't support final fields
Date Thu, 04 Jan 2018 00:36:00 GMT

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

ASF GitHub Bot commented on GROOVY-8430:
----------------------------------------

Github user asfgit closed the pull request at:

    https://github.com/apache/groovy/pull/652


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

Mime
View raw message