You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Paul King (Jira)" <ji...@apache.org> on 2020/01/27 10:46:00 UTC

[jira] [Updated] (GROOVY-5450) Final field assignment check on static compilation

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

Paul King updated GROOVY-5450:
------------------------------
    Fix Version/s:     (was: 3.x)

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