Commit f32cb83
committed
test(extractor): verify exported arrow function funcStack tracking in extractSpreadForOfWalk (#1354)
Add regression tests confirming that `export const f = (arr) => { for (const x of arr) x(); }`
correctly pushes `f` onto the funcStack so for-of bindings record the right enclosing caller.
The recursive walk visits `variable_declarator` regardless of whether it is nested under a plain
`lexical_declaration` or an `export_statement`, so the gap reported in the PR #1331 review was
already closed by commit a6c5d2d. These tests document and gate that behavior.
Closes #13541 parent 194507c commit f32cb83
1 file changed
Lines changed: 23 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
908 | 908 | | |
909 | 909 | | |
910 | 910 | | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
911 | 934 | | |
0 commit comments