Skip to content

Fixed a crash when parsing invalid decorator on await expression#62659

Merged
RyanCavanaugh merged 2 commits intomicrosoft:mainfrom
Andarist:fix/crash-dec-on-await
Oct 22, 2025
Merged

Fixed a crash when parsing invalid decorator on await expression#62659
RyanCavanaugh merged 2 commits intomicrosoft:mainfrom
Andarist:fix/crash-dec-on-await

Conversation

@Andarist
Copy link
Copy Markdown
Contributor

fixes #62657

@github-project-automation github-project-automation bot moved this from Not started to Needs merge in PR Backlog Oct 22, 2025
@RyanCavanaugh RyanCavanaugh enabled auto-merge (squash) October 22, 2025 17:50
auto-merge was automatically disabled October 22, 2025 17:54

Head branch was pushed to by a user without write access

@Andarist
Copy link
Copy Markdown
Contributor Author

@RyanCavanaugh I see you have approved before I pushed an extra change, you might want to take a quick look again. I think this might be slightly better in the context of the AST recovery~

@Andarist Andarist force-pushed the fix/crash-dec-on-await branch from 75315ee to 9735273 Compare October 22, 2025 18:45
@RyanCavanaugh RyanCavanaugh merged commit cbc2059 into microsoft:main Oct 22, 2025
33 checks passed
@github-project-automation github-project-automation bot moved this from Needs merge to Done in PR Backlog Oct 22, 2025
@Andarist Andarist deleted the fix/crash-dec-on-await branch October 22, 2025 21:41
Copilot AI added a commit to microsoft/typescript-go that referenced this pull request Feb 10, 2026
Port of microsoft/TypeScript#62659.
In parseVariableDeclarationList, replace debug.Assert(isAwaitUsingDeclaration())
with a conditional check that breaks out of the switch if false, preventing
a panic when encountering an invalid decorator on an await expression.

Co-authored-by: jakebailey <5341706+jakebailey@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Decorator declaration inside a function causes the typescript language server to crash

4 participants