Commit 9fb1a8b
authored
test(extractor): verify exported arrow function funcStack tracking in extractSpreadForOfWalk (#1359)
* 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 #1354
* fix: remove duplicate paramBindings in SerializedExtractorOutput and rename process test identifier
The merge at 3c164f2 introduced a second `paramBindings` field (using the
top-level ParamBinding import) alongside the existing inline-import form at
line 68, causing TS2300 duplicate-identifier errors that broke every CI job.
Removed the duplicate and the now-unused ParamBinding top-level import.
Also renamed the `process` arrow-function identifier in the Phase 8.3e test
to `handleItems` — `process` is a Node.js global and its presence in the test
obscures that the test is solely about the export-wrapping code path.1 parent 8407fcf commit 9fb1a8b
2 files changed
Lines changed: 25 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
23 | 22 | | |
24 | 23 | | |
25 | 24 | | |
| |||
74 | 73 | | |
75 | 74 | | |
76 | 75 | | |
77 | | - | |
78 | 76 | | |
79 | 77 | | |
80 | 78 | | |
| |||
| 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 | + | |
| 934 | + | |
| 935 | + | |
911 | 936 | | |
0 commit comments