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

Multi-assignment declarations should allow "final" keyword instead of "def" placeholder

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 3.0.0-beta-3
    • syntax
    • None

    Description

      The line:

      def (x, y) = l.split()

      works fine. However, the line:

      final (x, y) = l.split()

      fails with a compile error. If def gives a rebindable variable and final gives an unrebindable variable in other places it should here as well.

      Attachments

        Activity

          People

            daniel_sun Daniel Sun
            russel Dr. Russel Winder
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: