…ent within a lambda
Problem: Assigning to an element of an outer function's argument inside
a lambda (e.g., "arg.key = 1") causes a crash when the lambda
is called.
Solution: When an outer function's argument is found on the left-hand
side of an assignment, record that the outer scope is used and
treat the lambda as a closure.
When an outer function's argument was used on the left-hand side of an
assignment, a LOADOUTER instruction was generated, but the lambda was
not treated as a closure. Consequently, the outer stack was not set for
the partial, leading to a NULL reference during the execution of
LOADOUTER.
Signed-off-by: Hirohito Higashi <[email protected]>
When an outer function's argument was used on the left-hand side of an
assignment, a LOADOUTER instruction was generated, but the lambda was
not treated as a closure. Consequently, the outer stack was not set for
the partial, leading to a NULL reference during the execution of
LOADOUTER.
fixes: #21460
AI assistance
Checklist
Signed-off-by:trailer is present (git commit -s), recommended but not requiredTests
Documentation
runtime/doc/was updatedAnything reviewers should know