Skip to content

Commit

Permalink
Exclude rest
Browse files Browse the repository at this point in the history
  • Loading branch information
kdy1 committed Feb 1, 2023
1 parent 51c0e08 commit 085d646
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion crates/swc_ecma_transforms_base/src/resolver/mod.rs
Expand Up @@ -861,7 +861,12 @@ impl<'a> VisitMut for Resolver<'a> {
f.decorators.visit_mut_with(self);

{
let params: Vec<Id> = find_pat_ids(&f.params);
let params = f
.params
.iter()
.filter(|p| !p.pat.is_rest())
.flat_map(find_pat_ids)
.collect::<Vec<Id>>();

for id in params {
self.current.declared_symbols.insert(id.0, DeclKind::Param);
Expand Down

0 comments on commit 085d646

Please sign in to comment.