Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-8419

Groovyc: The variable ... is declared final but is reassigned

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Duplicate
    • 2.5.0-beta-2
    • None
    • Compiler
    • None

    Description

      Under Groovy apache-groovy-binary-2.5.0-beta-2 the following code

      final Map<Table, Table> tableTableMap = new TreeMap<>(Table.tableNameAndNameComparator).withDefault { final Table t ->
      	final tNew = new TableMapEntry(t, tableTableAliasMap)
      	return tNew
      } 
      

      throws

      Error:(214, 3) Groovyc: The variable [tNew] is declared final but is reassigned
      

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            emge mgroovy
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment