Skip to content

rescan in formatter if followed unary literal#29492

Closed
Kingwl wants to merge 2 commits intomicrosoft:masterfrom
Kingwl:format-unary-rescan
Closed

rescan in formatter if followed unary literal#29492
Kingwl wants to merge 2 commits intomicrosoft:masterfrom
Kingwl:format-unary-rescan

Conversation

@Kingwl
Copy link
Copy Markdown
Contributor

@Kingwl Kingwl commented Jan 19, 2019

Fixes #29330

after track,I found the reason of the assert failed caused the -1 has been scanned as prefixUnaryExpression -> Numeric Literal, i have rescan the literal and merge the prefix expression and number literal to a signal literal

@RyanCavanaugh
Copy link
Copy Markdown
Member

@sandersn is this the right approach?

@sheetalkamat
Copy link
Copy Markdown
Member

I think in general, instead of rescanning numeric literal, we usually handle prefixUnaryExpression for the negative numbers. eg. check serializeTypeNode

@Kingwl Kingwl closed this Mar 27, 2019
@microsoft microsoft locked as resolved and limited conversation to collaborators Oct 21, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Codefix for --noImplicitAny parameter: Error: Debug Failure. False expression: Token end is child end

4 participants