Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
compiler: close upvalues on loop control statements
When removing locals from all scopes, upvalues need to be considered, like in uc_compiler_leave_scope. Otherwise, the following testcase returns the wrong value: let dest; for (let i in [ 1 ]) { let foo = i; dest = () => { warn(`value: ${foo}\n`); }; continue; } dest(); // returns value: null instead of value: 1 Signed-off-by: Felix Fietkau <[email protected]>
- Loading branch information