Skip to content

Commit

Permalink
fix(semantic): incorrect ExportEntry span for ExportAllDeclaration in…
Browse files Browse the repository at this point in the history
… ModuleRecord
  • Loading branch information
Dunqing committed Mar 25, 2024
1 parent 525031b commit 94e22e8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions crates/oxc_semantic/src/module_record/builder.rs
Expand Up @@ -219,6 +219,7 @@ impl ModuleRecordBuilder {
exported_name.span(),
))
}),
span: decl.span,
..ExportEntry::default()
};
self.add_export_entry(export_entry);
Expand Down
2 changes: 1 addition & 1 deletion crates/oxc_semantic/src/module_record/mod.rs
Expand Up @@ -268,7 +268,7 @@ mod module_record_tests {
module_record.indirect_export_entries[1],
ExportEntry {
module_request: Some(NameSpan::new("mod".into(), Span::new(57, 62))),
span: Span::new(0, 0),
span: Span::new(37, 63),
import_name: ExportImportName::All,
export_name: ExportExportName::Name(NameSpan::new("ns".into(), Span::new(49, 51))),
local_name: ExportLocalName::Null,
Expand Down

0 comments on commit 94e22e8

Please sign in to comment.