Repository navigation
fix(64665): fix emit crash for duplicate private names in decorated classes - #64670
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
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.
Jake Bailey (jakebailey)
approved these changes
Oct 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #64665