[chapel-lang/chapel] Preserve param-ness in loop expressions

Branch: refs/heads/master
Revision: b2f5a22
Author: vasslitvinov
Log Message:

Merge pull request #16318 from vasslitvinov/params-in-loop-exprs

Preserve param-ness in loop expressions

Resolves #16308.

When building a loop expression function, do not create formals for those outer variables that are, in turn, formals of an enclosing function with a param intent. Outer variables that are type-intent formals are already dropped.

Loop expression formals that correspond to param fields are now marked with a param intent. Those corresponding to type fields are already marked appropriately.

r: @mppf

Modified Files:
A test/expressions/loop-expr/param-args-record.chpl
A test/expressions/loop-expr/param-args-record.good
A test/expressions/loop-expr/param-args-simple.chpl
A test/expressions/loop-expr/param-args-simple.good
M compiler/AST/LoopExpr.cpp

Compare: https://github.com/chapel-lang/chapel/compare/3157e86cd86f...b2f5a22eae4d