mirror of
https://github.com/swc-project/swc.git
synced 2024-10-04 20:28:43 +03:00
fix(es/utils): Fix collect_decls
(#2792)
swc_ecma_utils: - `collect_decls`: Handle assignment pattern property. (Closes #2785)
This commit is contained in:
parent
ee12362688
commit
af420eab4b
2
.github/workflows/cargo.yml
vendored
2
.github/workflows/cargo.yml
vendored
@ -256,7 +256,7 @@ jobs:
|
||||
|
||||
- name: Run cargo test (swc, concurrent)
|
||||
shell: bash
|
||||
if: matrix.crate == 'swc'
|
||||
if: matrix.crate == 'swc' && runner.os != 'Windows'
|
||||
run: |
|
||||
cargo test --color always -p swc --features concurrent
|
||||
|
||||
|
@ -2165,6 +2165,14 @@ where
|
||||
{
|
||||
noop_visit_type!();
|
||||
|
||||
fn visit_assign_pat_prop(&mut self, node: &AssignPatProp, _: &dyn Node) {
|
||||
node.value.visit_with(node, self);
|
||||
|
||||
if self.is_pat_decl {
|
||||
self.add(&node.key);
|
||||
}
|
||||
}
|
||||
|
||||
fn visit_class_decl(&mut self, node: &ClassDecl, _: &dyn Node) {
|
||||
node.visit_children_with(self);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user