Skip to content

fix(64665): fix emit crash for duplicate private names in decorated classes - #64670

Merged
Jake Bailey (jakebailey) merged 1 commit into
microsoft:mainfrom
a-tarasyuk:fix/64665
Oct 7, 2026
Merged

Jake Bailey (jakebailey) merged 1 commit into
microsoft:mainfrom
a-tarasyuk:fix/64665

Conversation

@a-tarasyuk

Copy link
Copy Markdown
Contributor

Fixes #64665

Copilot AI balanced review requested due to automatic review settings October 7, 2026 14:47
@typescript-automation typescript-automation Bot added the For Uncommitted Bug PR for untriaged, rejected, closed or missing bug label Oct 7, 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 focused transformer fix is supported by comprehensive regression baselines across relevant declaration forms and targets.

Review effort: Balanced
Findings: None

What changed in this PR

Fixes the decorated-class emit crash caused by duplicate static and instance private names.

Changes:

  • Handles invalid or untransformed private declarations without asserting.
  • Adds regression coverage across methods, fields, accessors, and emit targets.
  • Updates generated emit and diagnostic baselines.
File Description
tsc/​internal/​transformers/​estransforms/​classfields.go Safely resolves declaration-local private identifier metadata.
tsc/​testdata/​tests/​cases/​conformance/​esDecorators/​classDeclaration/​methods/​esDecorators-classDeclaration-methods-staticPrivate.ts Adds duplicate private-name cases.
tsc/​testdata/​baselines/​reference/​conformance/​esDecorators-classDeclaration-methods-staticPrivate(target=esnext).js Records ESNext emit.
tsc/​testdata/​baselines/​reference/​conformance/​esDecorators-classDeclaration-methods-staticPrivate(target=esnext).errors.txt Records ESNext diagnostics.
tsc/​testdata/​baselines/​reference/​conformance/​esDecorators-classDeclaration-methods-staticPrivate(target=es2022).js Records ES2022 emit.
tsc/​testdata/​baselines/​reference/​conformance/​esDecorators-classDeclaration-methods-staticPrivate(target=es2022).errors.txt Records ES2022 diagnostics.
tsc/​testdata/​baselines/​reference/​conformance/​esDecorators-classDeclaration-methods-staticPrivate(target=es2015).js Records ES2015 emit.
tsc/​testdata/​baselines/​reference/​conformance/​esDecorators-classDeclaration-methods-staticPrivate(target=es2015).errors.txt Records ES2015 diagnostics.

💡 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 and removed For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Oct 7, 2026
@jakebailey
Jake Bailey (jakebailey) added this pull request to the merge queue Oct 7, 2026
Merged via the queue into microsoft:main with commit 0ba5d99 Oct 7, 2026
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

For Backlog Bug PRs that fix a backlog bug

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

panic: Debug failure. False expression: Undeclared private name for property declaration.

3 participants