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 2017/12/22 11:49:00 UTC

[jira] [Resolved] (GROOVY-8419) Groovyc: The variable ... is declared final but is reassigned

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

Paul King resolved GROOVY-8419.
-------------------------------
    Resolution: Duplicate

I'll mark this as a duplicate but if you can provide a standalone testcase I'll add that to the other issue.

> Groovyc: The variable ... is declared final but is reassigned
> -------------------------------------------------------------
>
>                 Key: GROOVY-8419
>                 URL: https://issues.apache.org/jira/browse/GROOVY-8419
>             Project: Groovy
>          Issue Type: Bug
>          Components: Compiler
>    Affects Versions: 2.5.0-beta-2
>            Reporter: mgroovy
>            Priority: Minor
>
> Under Groovy apache-groovy-binary-2.5.0-beta-2 the following code 
> {code}
> final Map<Table, Table> tableTableMap = new TreeMap<>(Table.tableNameAndNameComparator).withDefault { final Table t ->
> 	final tNew = new TableMapEntry(t, tableTableAliasMap)
> 	return tNew
> } 
> {code}
> throws
> {code}
> Error:(214, 3) Groovyc: The variable [tNew] is declared final but is reassigned
> {code}



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