You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "mgroovy (JIRA)" <ji...@apache.org> on 2017/12/18 00:05:00 UTC

[jira] [Updated] (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 ]

mgroovy updated GROOVY-8419:
----------------------------
    Description: 
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}

  was:
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 = newTableMapEntry(t, tableTableAliasMap)
	return tNew
} 
{code}
throws
{code}
Error:(214, 3) Groovyc: The variable [tNew] is declared final but is reassigned
{code}


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