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

Use of control variable after a for loop generates bad bytecodes

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0-beta-4
    • 1.0-beta-4
    • None
    • None

    Description

      a = 1
      b = 5

      for (i in a..b)
      println i

      a = i

      produces:

      Exception in thread "main" java.lang.VerifyError: (class: test, method: run signature: ()Ljava/lang/Object Accessing value from uninitialized register 4

      Is i is too tightly scoped?

      Attachments

        Activity

          People

            Unassigned Unassigned
            tug John Wilson
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: