swc/crates/swc_ecma_minifier/tests/mangle
Austaras 93a264c9a4
fix(es/renamer): Ensure that param and function body are in same scope (#7271)
**Description:**

The problem arises in L235 of swc_ecma_transforms_base/src/rename/mod.rs

```rs
unit!(visit_mut_fn_decl, FnDecl, true);
```

which calls `get_map` and evals to

```rs
node.visit_children_with(&mut v);
```

with `FnDecl` and `Analyzer` in L132. However, in `Analyzer`, a visit to raw function was not overloaded, so function arguments and function body are considered different scopes.

**Related issue:**

 - Closes #7261.
2023-04-15 04:19:52 +00:00
..
1 feat(es/minifier): Align name mangler with terser (#5763) 2022-09-06 21:37:58 +09:00
2 fix(es/minifier): Fix calculation of character frequency (#5772) 2022-09-07 04:46:21 +00:00
issue-5766 feat(es/minifier): Make name mangler understand block scoping (#6670) 2023-01-06 03:14:10 +00:00
issue-6345/1 fix(es/compat): Fix span hygiene of function naming pass (#6345) 2022-11-14 06:03:09 +00:00
issue-6819 fix(es/renamer): Handle rest params correctly (#6821) 2023-01-16 06:57:16 +00:00
issue-7261 fix(es/renamer): Ensure that param and function body are in same scope (#7271) 2023-04-15 04:19:52 +00:00
reuse feat(es/minifier): Make name mangler understand block scoping (#6670) 2023-01-06 03:14:10 +00:00