Skip to content

Commit

Permalink
fix(isolated-declarations): should be added to references, not bindin…
Browse files Browse the repository at this point in the history
…gs (#3726)
  • Loading branch information
Dunqing committed Jun 17, 2024
1 parent 8f64d99 commit 0fbecdc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions crates/oxc_isolated_declarations/src/scope.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ impl<'a> Visit<'a> for ScopeTree<'a> {

fn visit_export_default_declaration(&mut self, decl: &ExportDefaultDeclaration<'a>) {
if let ExportDefaultDeclarationKind::Identifier(ident) = &decl.declaration {
self.add_type_binding(&ident.name);
self.add_value_binding(&ident.name);
self.add_type_reference(&ident.name);
self.add_value_reference(&ident.name);
} else {
walk_export_default_declaration(self, decl);
}
Expand Down
3 changes: 1 addition & 2 deletions tasks/coverage/transpile.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ commit: d8086f14

transpile Summary:
AST Parsed : 20/20 (100.00%)
Positive Passed: 8/20 (40.00%)
Positive Passed: 9/20 (45.00%)
Mismatch: "declarationAsyncAndGeneratorFunctions.ts"
Mismatch: "declarationBasicSyntax.ts"
Mismatch: "declarationComputedPropertyNames.ts"
Expand All @@ -14,4 +14,3 @@ Mismatch: "declarationPartialNodeReuseTypeOf.ts"
Mismatch: "declarationRestParameters.ts"
Mismatch: "declarationSingleFileHasErrors.ts"
Mismatch: "declarationSingleFileHasErrorsReported.ts"
Mismatch: "declarationsSimple.ts"

0 comments on commit 0fbecdc

Please sign in to comment.