swc/crates/swc_ecma_minifier/tests/terser/compress/properties
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
..
accessor_1 test(es/minifier): Remove mangle-only snapshots (#5979) 2022-09-28 21:35:52 +09:00
accessor_2 test(es/minifier): Remove analysis snapshot (#5939) 2022-09-23 13:14:42 +09:00
accessor_boolean test(es/minifier): Remove analysis snapshot (#5939) 2022-09-23 13:14:42 +09:00
accessor_get_set test(es/minifier): Remove analysis snapshot (#5939) 2022-09-23 13:14:42 +09:00
accessor_null_undefined test(es/minifier): Remove analysis snapshot (#5939) 2022-09-23 13:14:42 +09:00
accessor_number test(es/minifier): Remove analysis snapshot (#5939) 2022-09-23 13:14:42 +09:00
accessor_string test(es/minifier): Remove analysis snapshot (#5939) 2022-09-23 13:14:42 +09:00
accessor_this test(es/minifier): Remove analysis snapshot (#5939) 2022-09-23 13:14:42 +09:00
array_hole test(es/minifier): Remove mangle-only snapshots (#5979) 2022-09-28 21:35:52 +09:00
computed_property test(es/minifier): Remove mangle-only snapshots (#5979) 2022-09-28 21:35:52 +09:00
const_prop_assign_pure test(es/minifier): Remove mangle-only snapshots (#5979) 2022-09-28 21:35:52 +09:00
const_prop_assign_strict test(es/minifier): Remove mangle-only snapshots (#5979) 2022-09-28 21:35:52 +09:00
dont_mangle_computed_property_1 test(es/minifier): Remove mangle-only snapshots (#5979) 2022-09-28 21:35:52 +09:00
dont_mangle_computed_property_2 test(es/minifier): Remove mangle-only snapshots (#5979) 2022-09-28 21:35:52 +09:00
dot_properties test(es/minifier): Remove analysis snapshot (#5939) 2022-09-23 13:14:42 +09:00
dot_properties_es5 test(es/minifier): Remove analysis snapshot (#5939) 2022-09-23 13:14:42 +09:00
evaluate_array_length test(es/minifier): Remove mangle-only snapshots (#5979) 2022-09-28 21:35:52 +09:00
evaluate_string_length test(es/minifier): Remove analysis snapshot (#5939) 2022-09-23 13:14:42 +09:00
first_256_chars_as_properties test(es/minifier): Remove analysis snapshot (#5939) 2022-09-23 13:14:42 +09:00
first_256_hex_chars_as_properties test(es/minifier): Remove analysis snapshot (#5939) 2022-09-23 13:14:42 +09:00
first_256_unicode_chars_as_properties test(es/minifier): Remove analysis snapshot (#5939) 2022-09-23 13:14:42 +09:00
issue_869_1 test(es/minifier): Remove mangle-only snapshots (#5979) 2022-09-28 21:35:52 +09:00
issue_869_2 test(es/minifier): Remove mangle-only snapshots (#5979) 2022-09-28 21:35:52 +09:00
issue_2208_1 test(es/minifier): Remove mangle-only snapshots (#5979) 2022-09-28 21:35:52 +09:00
issue_2208_2 test(es/minifier): Remove mangle-only snapshots (#5979) 2022-09-28 21:35:52 +09:00
issue_2208_3 test(es/minifier): Remove mangle-only snapshots (#5979) 2022-09-28 21:35:52 +09:00
issue_2208_4 test(es/minifier): Remove mangle-only snapshots (#5979) 2022-09-28 21:35:52 +09:00
issue_2208_5 test(es/minifier): Remove mangle-only snapshots (#5979) 2022-09-28 21:35:52 +09:00
issue_2208_6 test(es/minifier): Remove mangle-only snapshots (#5979) 2022-09-28 21:35:52 +09:00
issue_2208_7 test(es/minifier): Remove mangle-only snapshots (#5979) 2022-09-28 21:35:52 +09:00
issue_2208_8 test(es/minifier): Remove mangle-only snapshots (#5979) 2022-09-28 21:35:52 +09:00
issue_2208_9 test(es/minifier): Remove mangle-only snapshots (#5979) 2022-09-28 21:35:52 +09:00
issue_2256 test(es/minifier): Remove mangle-only snapshots (#5979) 2022-09-28 21:35:52 +09:00
issue_2321 test(es/minifier): Remove mangle-only snapshots (#5979) 2022-09-28 21:35:52 +09:00
issue_2513 test(es/minifier): Remove mangle-only snapshots (#5979) 2022-09-28 21:35:52 +09:00
issue_2816 test(es/minifier): Remove mangle-only snapshots (#5979) 2022-09-28 21:35:52 +09:00
issue_2816_ecma6 test(es/minifier): Remove mangle-only snapshots (#5979) 2022-09-28 21:35:52 +09:00
issue_2893_1 test(es/minifier): Remove mangle-only snapshots (#5979) 2022-09-28 21:35:52 +09:00
issue_2893_2 test(es/minifier): Remove analysis snapshot (#5939) 2022-09-23 13:14:42 +09:00
issue_2893_3 test(es/minifier): Remove mangle-only snapshots (#5979) 2022-09-28 21:35:52 +09:00
issue_2893_4 test(es/minifier): Remove analysis snapshot (#5939) 2022-09-23 13:14:42 +09:00
issue_2893_5 test(es/minifier): Remove mangle-only snapshots (#5979) 2022-09-28 21:35:52 +09:00
issue_2893_6 test(es/minifier): Remove analysis snapshot (#5939) 2022-09-23 13:14:42 +09:00
issue_2893_7 test(es/minifier): Remove mangle-only snapshots (#5979) 2022-09-28 21:35:52 +09:00
issue_2893_8 test(es/minifier): Remove analysis snapshot (#5939) 2022-09-23 13:14:42 +09:00
issue_3188_1 test(es/minifier): Remove mangle-only snapshots (#5979) 2022-09-28 21:35:52 +09:00
issue_3188_2 test(es/minifier): Remove mangle-only snapshots (#5979) 2022-09-28 21:35:52 +09:00
issue_3188_3 test(es/minifier): Remove mangle-only snapshots (#5979) 2022-09-28 21:35:52 +09:00
issue_t64 test(es/minifier): Remove mangle-only snapshots (#5979) 2022-09-28 21:35:52 +09:00
join_object_assignments_1 test(es/minifier): Remove mangle-only snapshots (#5979) 2022-09-28 21:35:52 +09:00
join_object_assignments_2 test(es/minifier): Remove mangle-only snapshots (#5979) 2022-09-28 21:35:52 +09:00
join_object_assignments_3 test(es/minifier): Remove mangle-only snapshots (#5979) 2022-09-28 21:35:52 +09:00
join_object_assignments_4 test(es/minifier): Remove analysis snapshot (#5939) 2022-09-23 13:14:42 +09:00
join_object_assignments_for test(es/minifier): Remove mangle-only snapshots (#5979) 2022-09-28 21:35:52 +09:00
join_object_assignments_forin test(es/minifier): Remove mangle-only snapshots (#5979) 2022-09-28 21:35:52 +09:00
join_object_assignments_if test(es/minifier): Remove mangle-only snapshots (#5979) 2022-09-28 21:35:52 +09:00
join_object_assignments_Infinity test(es/minifier): Remove analysis snapshot (#5939) 2022-09-23 13:14:42 +09:00
join_object_assignments_NaN_1 test(es/minifier): Remove analysis snapshot (#5939) 2022-09-23 13:14:42 +09:00
join_object_assignments_NaN_2 test(es/minifier): Remove analysis snapshot (#5939) 2022-09-23 13:14:42 +09:00
join_object_assignments_negative test(es/minifier): Remove analysis snapshot (#5939) 2022-09-23 13:14:42 +09:00
join_object_assignments_null_0 test(es/minifier): Remove analysis snapshot (#5939) 2022-09-23 13:14:42 +09:00
join_object_assignments_null_1 test(es/minifier): Remove analysis snapshot (#5939) 2022-09-23 13:14:42 +09:00
join_object_assignments_regex test(es/minifier): Remove analysis snapshot (#5939) 2022-09-23 13:14:42 +09:00
join_object_assignments_return_1 test(es/minifier): Remove mangle-only snapshots (#5979) 2022-09-28 21:35:52 +09:00
join_object_assignments_return_2 test(es/minifier): Remove mangle-only snapshots (#5979) 2022-09-28 21:35:52 +09:00
join_object_assignments_return_3 test(es/minifier): Remove mangle-only snapshots (#5979) 2022-09-28 21:35:52 +09:00
join_object_assignments_undefined_1 test(es/minifier): Remove analysis snapshot (#5939) 2022-09-23 13:14:42 +09:00
join_object_assignments_undefined_2 test(es/minifier): Remove analysis snapshot (#5939) 2022-09-23 13:14:42 +09:00
join_object_assignments_void_0 test(es/minifier): Remove analysis snapshot (#5939) 2022-09-23 13:14:42 +09:00
keep_properties test(es/minifier): Remove analysis snapshot (#5939) 2022-09-23 13:14:42 +09:00
lhs_prop_1 test(es/minifier): Remove mangle-only snapshots (#5979) 2022-09-28 21:35:52 +09:00
lhs_prop_2 test(es/minifier): Remove mangle-only snapshots (#5979) 2022-09-28 21:35:52 +09:00
literal_duplicate_key_side_effects test(es/minifier): Remove mangle-only snapshots (#5979) 2022-09-28 21:35:52 +09:00
mangle_debug test(es/minifier): Remove mangle-only snapshots (#5979) 2022-09-28 21:35:52 +09:00
mangle_debug_suffix test(es/minifier): Remove mangle-only snapshots (#5979) 2022-09-28 21:35:52 +09:00
mangle_debug_suffix_keep_quoted test(es/minifier): Remove mangle-only snapshots (#5979) 2022-09-28 21:35:52 +09:00
mangle_debug_true test(es/minifier): Remove mangle-only snapshots (#5979) 2022-09-28 21:35:52 +09:00
mangle_define_property_arg test(es/minifier): Remove mangle-only snapshots (#5979) 2022-09-28 21:35:52 +09:00
mangle_private_properties fix(es/renamer): Ensure that param and function body are in same scope (#7271) 2023-04-15 04:19:52 +00:00
mangle_properties test(es/minifier): Remove mangle-only snapshots (#5979) 2022-09-28 21:35:52 +09:00
mangle_properties_which_matches_pattern test(es/minifier): Remove mangle-only snapshots (#5979) 2022-09-28 21:35:52 +09:00
mangle_undeclared_properties test(es/minifier): Remove mangle-only snapshots (#5979) 2022-09-28 21:35:52 +09:00
mangle_unquoted_properties test(es/minifier): Remove mangle-only snapshots (#5979) 2022-09-28 21:35:52 +09:00
methods_keep_quoted_false test(es/minifier): Remove mangle-only snapshots (#5979) 2022-09-28 21:35:52 +09:00
methods_keep_quoted_from_dead_code test(es/minifier): Remove mangle-only snapshots (#5979) 2022-09-28 21:35:52 +09:00
methods_keep_quoted_true test(es/minifier): Remove mangle-only snapshots (#5979) 2022-09-28 21:35:52 +09:00
native_prototype test(es/minifier): Remove mangle-only snapshots (#5979) 2022-09-28 21:35:52 +09:00
native_prototype_lhs test(es/minifier): Remove mangle-only snapshots (#5979) 2022-09-28 21:35:52 +09:00
new_this test(es/minifier): Remove mangle-only snapshots (#5979) 2022-09-28 21:35:52 +09:00
prop_side_effects_1 test(es/minifier): Remove mangle-only snapshots (#5979) 2022-09-28 21:35:52 +09:00
prop_side_effects_2 test(es/minifier): Remove mangle-only snapshots (#5979) 2022-09-28 21:35:52 +09:00
skip_undeclared_properties_by_default test(es/minifier): Remove mangle-only snapshots (#5979) 2022-09-28 21:35:52 +09:00
sub_properties test(es/minifier): Remove analysis snapshot (#5939) 2022-09-23 13:14:42 +09:00
unsafe_methods_regex test(es/minifier): Remove mangle-only snapshots (#5979) 2022-09-28 21:35:52 +09:00