Commit 2bf316a
fix(es/compat): Fix remaining post-order traversal issues in arrow transform
This commit addresses the remaining post-order traversal issues identified in the code review.
Changes:
- Fixed arrow function params: Now hoists `this`/`arguments` before converting nested arrows
- Fixed getter_prop body: Now hoists `this`/`arguments` before converting nested arrows
- Fixed setter_prop body: Now hoists `this`/`arguments` before converting nested arrows
The fix ensures that in all cases, `this` and `arguments` references are replaced with
hoisted variables BEFORE nested arrow functions are converted to regular functions. This
prevents the issue where the hoister can't recurse into already-converted regular functions.
Test results:
- All 26 arrow function tests pass
- Updated getter-setter snapshot to reflect correct hoisting behavior
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Donny/강동윤 <kdy1@users.noreply.github.com>1 parent 8bd23ac commit 2bf316a
2 files changed
+22
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
125 | | - | |
| 125 | + | |
126 | 126 | | |
| 127 | + | |
| 128 | + | |
127 | 129 | | |
128 | 130 | | |
129 | 131 | | |
| |||
196 | 198 | | |
197 | 199 | | |
198 | 200 | | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
199 | 206 | | |
200 | 207 | | |
201 | 208 | | |
| |||
233 | 240 | | |
234 | 241 | | |
235 | 242 | | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
236 | 248 | | |
237 | 249 | | |
238 | 250 | | |
| |||
Lines changed: 9 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | | - | |
10 | | - | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
11 | 13 | | |
12 | 14 | | |
13 | | - | |
14 | | - | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
15 | 18 | | |
16 | 19 | | |
17 | 20 | | |
0 commit comments