Skip to content

fix(64421): convert nested rest bindings to assignment targets - #64422

Open
Oleksandr Tarasiuk (a-tarasyuk) wants to merge 1 commit into
microsoft:mainfrom
a-tarasyuk:fix/64421
Open

Oleksandr Tarasiuk (a-tarasyuk) wants to merge 1 commit into
microsoft:mainfrom
a-tarasyuk:fix/64421

Conversation

@a-tarasyuk

Copy link
Copy Markdown
Contributor

Fixes #64421

Copilot AI balanced review requested due to automatic review settings September 24, 2026 09:29
@typescript-automation typescript-automation Bot added For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Sep 24, 2026
@github-project-automation github-project-automation Bot moved this to Not started in PR Backlog Sep 24, 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.

Copilot review overview

🟢 Approval recommended

The targeted conversion is correct and covered across both affected transformation paths.

Review effort: Balanced
Findings: None

What changed in this PR

Fixes compiler panics when converting nested rest binding patterns into assignment targets.

Changes:

  • Converts nested rest binding names before creating spread elements.
  • Adds regression coverage for using and exported destructuring.
  • Adds corresponding emit, type, and symbol baselines.
File Description
tsc/​internal/​transformers/​utilities.go Converts nested rest targets into assignment patterns.
tsc/​testdata/​tests/​cases/​compiler/​usingDeclarationsNestedRest.ts Tests the reported using transformation crash.
tsc/​testdata/​tests/​cases/​compiler/​exportDestructuringIterator.ts Tests exported nested rest destructuring.
tsc/​testdata/​baselines/​reference/​compiler/​usingDeclarationsNestedRest.js Captures corrected JavaScript emit.
tsc/​testdata/​baselines/​reference/​compiler/​usingDeclarationsNestedRest.types Captures inferred types.
tsc/​testdata/​baselines/​reference/​compiler/​usingDeclarationsNestedRest.symbols Captures bound symbols.
tsc/​testdata/​baselines/​reference/​compiler/​exportDestructuringIterator.js Captures CommonJS export emit.
tsc/​testdata/​baselines/​reference/​compiler/​exportDestructuringIterator.types Captures exported binding types.
tsc/​testdata/​baselines/​reference/​compiler/​exportDestructuringIterator.symbols Captures exported binding symbols.

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

@typescript-automation typescript-automation Bot added For Backlog Bug PRs that fix a backlog bug For Milestone Bug PRs that fix a bug with a specific milestone and removed For Uncommitted Bug PR for untriaged, rejected, closed or missing bug For Backlog Bug PRs that fix a backlog bug labels Sep 25, 2026

This branch has not been deployed

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

Labels

For Milestone Bug PRs that fix a bug with a specific milestone

Projects

Status: Not started

Development

Successfully merging this pull request may close these issues.

panic: unexpected Expression: KindArrayBindingPattern [recovered, repanicked]

3 participants