Skip to content

Fix crash on decorated anonymous class declaration - #63971

Open
Mateusz Burzyński (Andarist) wants to merge 4 commits into
microsoft:mainfrom
Andarist:fix/crash-decorated-anonymous-class
Open

Fix crash on decorated anonymous class declaration#63971
Mateusz Burzyński (Andarist) wants to merge 4 commits into
microsoft:mainfrom
Andarist:fix/crash-decorated-anonymous-class

Conversation

@Andarist

Copy link
Copy Markdown
Contributor

fixes #63962

Copilot AI balanced review requested due to automatic review settings August 23, 2026 17:28
@github-project-automation github-project-automation Bot moved this to Not started in PR Backlog Aug 23, 2026
@typescript-automation typescript-automation Bot added the For Uncommitted Bug PR for untriaged, rejected, closed or missing bug label Aug 23, 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.

Pull request overview

Fixes the decorated anonymous class crash by generating a class name before ES decorator transformation.

Changes:

  • Detects decorators on the class itself or its children.
  • Adds a compiler regression test and expected baselines.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tsc/internal/transformers/tstransforms/runtimesyntax.go Generates names for decorated anonymous classes.
tsc/testdata/tests/cases/compiler/anonymousClassDeclarationWithClassDecorator.ts Adds the crash regression case.
tsc/testdata/baselines/reference/compiler/anonymousClassDeclarationWithClassDecorator.js Records emitted JavaScript.
tsc/testdata/baselines/reference/compiler/anonymousClassDeclarationWithClassDecorator.errors.txt Records the expected diagnostic.
tsc/testdata/baselines/reference/compiler/anonymousClassDeclarationWithClassDecorator.symbols Records symbol information.
tsc/testdata/baselines/reference/compiler/anonymousClassDeclarationWithClassDecorator.types Records type information.

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

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.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Comment thread tsc/internal/transformers/tstransforms/runtimesyntax.go Outdated
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.

Crash: class-level decorator on an anonymous class panics during ES decorator emit

2 participants