swc/crates/swc_ecma_minifier/tests/mangle/issue-7261
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
..
input.js fix(es/renamer): Ensure that param and function body are in same scope (#7271) 2023-04-15 04:19:52 +00:00
output.js fix(es/renamer): Ensure that param and function body are in same scope (#7271) 2023-04-15 04:19:52 +00:00