Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(isolated-declarations): should be added to references, not bindings #3726

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"