Uploaded image for project: 'Commons JEXL'
  1. Commons JEXL
  2. JEXL-285

For statement variable may seem unaffected by iteration

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.1
    • 3.2
    • None

    Description

      When a 'for' loop uses a global variable (as in (for c: ...)), if a local variable with that name has been declared previously, the global variable is nevertheless used for iteration. Since the local variable is preferred during resolution in statements within the loop, the iteration does not change the variable value.

      Attachments

        Activity

          People

            henrib Henri Biestro
            henrib Henri Biestro
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: