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

'for' statement without a body should update its variable

    XMLWordPrintableJSON

Details

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

    Description

      The following scripts produce different results

      x = 0; for(x : 1..2); return x

      and

      x = 0; for(x : 1..2){}; return x

      The expected behaviour is that both scripts should return the same value of 2, i.e. the 'for' statement without a body should nevertheless update its iteration variable

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: