Skip to content

Commit 452ce2e

Browse files
committed
merge fixup
1 parent cc0dd12 commit 452ce2e

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

internal/checker/checker.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6451,7 +6451,7 @@ func (c *Checker) checkAliasSymbol(node *ast.Node) {
64516451
if ast.IsExportSpecifier(node) {
64526452
diag := c.error(errorNode, diagnostics.Types_cannot_appear_in_export_declarations_in_JavaScript_files)
64536453
if sourceSymbol := ast.GetSourceFileOfNode(node).AsNode().Symbol(); sourceSymbol != nil {
6454-
if alreadyExportedSymbol := sourceSymbol.Exports[node.PropertyNameOrName().Text()]; alreadyExportedSymbol == target {
6454+
if alreadyExportedSymbol := sourceSymbol.Exports.Get(node.PropertyNameOrName().Text()); alreadyExportedSymbol == target {
64556455
if exportingDeclaration := core.Find(alreadyExportedSymbol.Declarations, ast.IsJSTypeAliasDeclaration); exportingDeclaration != nil {
64566456
diag.AddRelatedInfo(NewDiagnosticForNode(exportingDeclaration, diagnostics.X_0_is_automatically_exported_here, alreadyExportedSymbol.Name))
64576457
}
@@ -15550,7 +15550,7 @@ func (c *Checker) getExportsOfModuleWorker(moduleSymbol *ast.Symbol) (exports as
1555015550
for _, node := range exportStars.Declarations {
1555115551
resolvedModule := c.resolveExternalModuleName(node, node.AsExportDeclaration().ModuleSpecifier, false /*ignoreErrors*/)
1555215552
exportedSymbols := visit(resolvedModule, node, isTypeOnly || node.AsExportDeclaration().IsTypeOnly)
15553-
c.extendExportSymbols(nestedSymbols, exportedSymbols, lookupTable, node)
15553+
c.extendExportSymbols(nestedSymbols, ast.GetSymbolTable(&exportedSymbols), lookupTable, node)
1555415554
}
1555515555
for id, s := range lookupTable {
1555615556
// It's not an error if the file with multiple `export *`s with duplicate names exports a member with that name itself

internal/checker/emitresolver.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,8 @@ func (r *emitResolver) IsDefinitelyReferenceToGlobalSymbolObject(node *ast.Node)
519519
r.checkerMu.Lock()
520520
defer r.checkerMu.Unlock()
521521
// Exactly `globalThis.Symbol.something` and `globalThis` resolves to the global `globalThis`
522-
return r.checker.getResolvedSymbol(node.Expression().Expression()) == r.checker.globalThisSymbol
522+
resolved := r.checker.getResolvedSymbol(node.Expression().Expression())
523+
return resolved == r.checker.denoGlobalThisSymbol || resolved == r.checker.nodeGlobalThisSymbol
523524
}
524525

525526
func (r *emitResolver) RequiresAddingImplicitUndefined(declaration *ast.Node, symbol *ast.Symbol, enclosingDeclaration *ast.Node) bool {

0 commit comments

Comments
 (0)