[jira] [Created] (JEXL-286) 'for' statement without a body should update its variable

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Created] (JEXL-286) 'for' statement without a body should update its variable

JIRA jira@apache.org
Dmitri Blinov created JEXL-286:
----------------------------------

             Summary: 'for' statement without a body should update its variable
                 Key: JEXL-286
                 URL: https://issues.apache.org/jira/browse/JEXL-286
             Project: Commons JEXL
          Issue Type: Bug
    Affects Versions: 3.1
            Reporter: Dmitri Blinov


The following scripts produce different results
{code:java}
x = 0; for(x : 1..2); return x{code}
and
{code:java}
x = 0; for(x : 1..2){}; return x{code}
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



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)