Commit cfb6d87
fix(es/compat): Revert redundant hoister visits in getter/setter props
This commit reverts the changes to visit_mut_getter_prop and visit_mut_setter_prop
that were introduced in commit 2bf316a. These changes introduced redundant visits
to the hoister, which is incorrect.
Unlike arrow functions which need special handling, getters and setters already
create new hoister scopes via `old_rep = self.hoister.take()`, so the additional
hoister visit before the main visit is unnecessary and incorrect.
Changes:
- Reverted visit_mut_getter_prop to original implementation
- Reverted visit_mut_setter_prop to original implementation
- Reverted getter-setter/output.js test snapshot to original
The original fix for issue #11422 (arrow function this context) remains intact.
Co-authored-by: Donny/강동윤 <kdy1@users.noreply.github.com>1 parent 2bf316a commit cfb6d87
2 files changed
+6
-19
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
198 | 198 | | |
199 | 199 | | |
200 | 200 | | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | 201 | | |
207 | 202 | | |
208 | 203 | | |
| |||
240 | 235 | | |
241 | 236 | | |
242 | 237 | | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | 238 | | |
249 | 239 | | |
250 | 240 | | |
| |||
Lines changed: 6 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
7 | | - | |
| 5 | + | |
| 6 | + | |
8 | 7 | | |
9 | 8 | | |
10 | | - | |
11 | | - | |
12 | | - | |
| 9 | + | |
| 10 | + | |
13 | 11 | | |
14 | 12 | | |
15 | | - | |
16 | | - | |
17 | | - | |
| 13 | + | |
| 14 | + | |
18 | 15 | | |
19 | 16 | | |
20 | 17 | | |
0 commit comments