groovy-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul King (JIRA)" <>
Subject [jira] [Created] (GROOVY-8430) @Field doesn't support final fields
Date Tue, 02 Jan 2018 14:27:00 GMT
Paul King created GROOVY-8430:

             Summary: @Field doesn't support final fields
                 Key: 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:
@Field final foo = 42
giving the error:
cannot modify final field 'foo' outside of constructor.
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

View raw message