Skip to content

Commit 1d12515

Browse files
Fix panic runtime error on ast.KindTupleTypes
1 parent 96e5669 commit 1d12515

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

internal/transformers/declarations/tracker.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,10 @@ func (s *SymbolTrackerImpl) handleSymbolAccessibilityError(symbolAccessibilityRe
173173
// Add aliases back onto the possible imports list if they're not there so we can try them again with updated visibility info
174174
if len(symbolAccessibilityResult.AliasesToMakeVisible) > 0 {
175175
for _, ref := range symbolAccessibilityResult.AliasesToMakeVisible {
176-
s.state.lateMarkedStatements = core.AppendIfUnique(s.state.lateMarkedStatements, ref)
176+
// Only queue statements from the current source file, mirroring TS's per-file late painting
177+
if ast.GetSourceFileOfNode(ref) == s.state.currentSourceFile {
178+
s.state.lateMarkedStatements = core.AppendIfUnique(s.state.lateMarkedStatements, ref)
179+
}
177180
}
178181
}
179182
// TODO: Do all these accessibility checks inside/after the first pass in the checker when declarations are enabled, if possible

0 commit comments

Comments
 (0)