rlwhitcomb / utilities

Some of my personal utility programs
MIT License
2 stars 0 forks source link

Assignments inside "loop" range expressions don't work #615

Closed rlwhitcomb closed 1 year ago

rlwhitcomb commented 1 year ago

Try this pattern:

loop over x=fileinfo('build.xml') { x[__} }
x -> <null>

As you can see the "x" variable is not set in this context.

Suggest it should get set in the surrounding context, not the context of inside the loop statement (this conforms to other statements such as "if" and "while" that will set such a variable into the surrounding context.