Skip to content

Commit 0fbecdc

Browse files
committed
fix(isolated-declarations): should be added to references, not bindings (#3726)
1 parent 8f64d99 commit 0fbecdc

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

crates/oxc_isolated_declarations/src/scope.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,8 @@ impl<'a> Visit<'a> for ScopeTree<'a> {
133133

134134
fn visit_export_default_declaration(&mut self, decl: &ExportDefaultDeclaration<'a>) {
135135
if let ExportDefaultDeclarationKind::Identifier(ident) = &decl.declaration {
136-
self.add_type_binding(&ident.name);
137-
self.add_value_binding(&ident.name);
136+
self.add_type_reference(&ident.name);
137+
self.add_value_reference(&ident.name);
138138
} else {
139139
walk_export_default_declaration(self, decl);
140140
}

tasks/coverage/transpile.snap

+1-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ commit: d8086f14
22

33
transpile Summary:
44
AST Parsed : 20/20 (100.00%)
5-
Positive Passed: 8/20 (40.00%)
5+
Positive Passed: 9/20 (45.00%)
66
Mismatch: "declarationAsyncAndGeneratorFunctions.ts"
77
Mismatch: "declarationBasicSyntax.ts"
88
Mismatch: "declarationComputedPropertyNames.ts"
@@ -14,4 +14,3 @@ Mismatch: "declarationPartialNodeReuseTypeOf.ts"
1414
Mismatch: "declarationRestParameters.ts"
1515
Mismatch: "declarationSingleFileHasErrors.ts"
1616
Mismatch: "declarationSingleFileHasErrorsReported.ts"
17-
Mismatch: "declarationsSimple.ts"

0 commit comments

Comments
 (0)