Skip to content

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

Merged
Ryan Cavanaugh (RyanCavanaugh) merged 2 commits into
microsoft:mainfrom
Andarist:fix/crash-dec-on-await
Oct 22, 2025
Merged

Fixed a crash when parsing invalid decorator on await expression#62659
Ryan Cavanaugh (RyanCavanaugh) merged 2 commits into
microsoft: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
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

Ryan Cavanaugh (@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~

@RyanCavanaugh
Ryan Cavanaugh (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
Mateusz Burzyński (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>
@microsoft Microsoft (microsoft) locked as resolved and limited conversation to collaborators Apr 21, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

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