Skip to content

Fixed a crash related to variadic tuple elements with intersections containing InstantiableNonPrimitive - #64239

Open
Mateusz Burzyński (Andarist) wants to merge 1 commit into
microsoft:mainfrom
Andarist:fix/recursive-variadic-tuple-crash
Open

Fixed a crash related to variadic tuple elements with intersections containing InstantiableNonPrimitive#64239
Mateusz Burzyński (Andarist) wants to merge 1 commit into
microsoft:mainfrom
Andarist:fix/recursive-variadic-tuple-crash

Conversation

@Andarist

Copy link
Copy Markdown
Contributor

fixes #63040
recreates #63128

Copilot AI balanced review requested due to automatic review settings September 11, 2026 08:24
@github-project-automation github-project-automation Bot moved this to Not started in PR Backlog Sep 11, 2026
@typescript-automation typescript-automation Bot added the For Uncommitted Bug PR for untriaged, rejected, closed or missing bug label Sep 11, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The focused fix handles the reported intersection case and includes matching regression coverage.

Pull request overview

Prevents recursive variadic tuple normalization from overflowing when intersections contain generic instantiable types.

Changes:

  • Detects generic types within unions or intersections.
  • Adds regression coverage for issue #63040 and expected baselines.
File summaries
File Description
tsc/internal/checker/checker.go Updates tuple normalization and adds a contained-type helper.
tsc/testdata/tests/cases/compiler/recursiveConditionalCrash5.ts Adds the crash regression case.
tsc/testdata/baselines/reference/compiler/recursiveConditionalCrash5.errors.txt Records the expected diagnostic.
tsc/testdata/baselines/reference/compiler/recursiveConditionalCrash5.types Records inferred types.
tsc/testdata/baselines/reference/compiler/recursiveConditionalCrash5.symbols Records resolved symbols.
Review details
  • Files reviewed: 5/5 changed files
  • Comments generated: 0
  • Review effort level: Balanced

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

For Uncommitted Bug PR for untriaged, rejected, closed or missing bug

Projects

Status: Not started

Development

Successfully merging this pull request may close these issues.

RangeError: Maximum call stack size exceeded in getTypeFromTypeNode when resolving recursive tuple rest with intersection

3 participants