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

Inconsistent checking of final for multi-assignments

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.5.0-alpha-1
    • Compiler
    • None

    Description

      The following code passes but should fail final variable analysis:

      final x = 3
      def y = 4
      (x, y) = [30, 40]
      assert x + y == 70
      

      Attachments

        Issue Links

          Activity

            People

              paulk Paul King
              paulk Paul King
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: