swc/crates/swc_ecma_minifier/tests
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
..
benches-full fix(es/minifier): Remove wrong optimization of new RegExp(…) (#7091) 2023-03-17 03:22:02 +00:00
fixture fix(es/minifier): Fix handling of optional chaining when hoist_props is enabled (#7246) 2023-04-13 03:23:29 +00:00
full fix(es/renamer): Don't use symbols used by declarations if eval exists (#7116) 2023-03-22 06:31:43 +00:00
mangle fix(es/renamer): Ensure that param and function body are in same scope (#7271) 2023-04-15 04:19:52 +00:00
pass-1 feat(es/minifier): Optimize calls to Boolean/Number/String/Symbol (#7006) 2023-03-04 04:14:14 +00:00
pass-default feat(es/minifier): Implement trivial optimizations (#6256) 2022-11-02 01:21:32 +00:00
projects fix(es/renamer): Don't use symbols used by declarations if eval exists (#7116) 2023-03-22 06:31:43 +00:00
terser/compress fix(es/renamer): Ensure that param and function body are in same scope (#7271) 2023-04-15 04:19:52 +00:00
compress.rs refactor: Fix lints using clippy from nightly-2023-03-13 (#6920) 2023-03-14 04:56:21 +00:00
eval.rs perf(es/ast): Shrink size of Expr (#7041) 2023-03-09 13:34:11 +00:00
exec.rs fix(es/helpers): Use snake_case for helpers (#7147) 2023-03-31 15:15:21 +09:00
mangle.rs fix(es/minifier): Make name mangler respect toplevel (#6774) 2023-01-10 06:42:49 +00:00
passing.txt feat(es/minifier): Optimize calls to Boolean/Number/String/Symbol (#7006) 2023-03-04 04:14:14 +00:00
postponed.txt feat(es/renamer): Support safari10 from the name mangler (#6801) 2023-01-13 05:00:13 +00:00
terser_exec_base.js refactor(es/minifier): Make rust-analyzer fast, really (#4746) 2022-05-23 16:16:05 +09:00
terser_exec.rs refactor: Fix lints using clippy from nightly-2023-03-13 (#6920) 2023-03-14 04:56:21 +00:00
TODO.txt feat(es/minifier): Optimize calls to Boolean/Number/String/Symbol (#7006) 2023-03-04 04:14:14 +00:00