[
https://issues.apache.org/jira/browse/GROOVY-5450?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14472846#comment-14472846
]
Paul King edited comment on GROOVY-5450 at 1/27/20 10:45 AM:
-------------------------------------------------------------
This is also related to GROOVY-4681, which addresses the issue for local
variables.
was (Author: rgarcia):
This is also related to
[GROOVY-4681|http://jira.codehaus.org/browse/GROOVY-4681], which addresses the
issue for local variables.
> Final field assignment check on static compilation
> --------------------------------------------------
>
> Key: GROOVY-5450
> URL: https://issues.apache.org/jira/browse/GROOVY-5450
> Project: Groovy
> Issue Type: New Feature
> Components: Compiler
> Affects Versions: 2.0-beta-3
> Reporter: Renato Garcia
> Priority: Major
> Labels: contrib
> Fix For: 3.x
>
>
> The following class definition should generate a compilation error on final
> field assignment.
> {code}
> @CompileStatic
> class StaticGroovy3 {
> def testFinalField() {
> new FinalField().aField = ""
> }
> }
> class FinalField {
> final aField;
> }
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)