-
-
Notifications
You must be signed in to change notification settings - Fork 15k
Unary plus gives suboptimal parse error #88276
Copy link
Copy link
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Given the following code:
The current output is:
Ideally, if we want to continue rejecting unary plus on number literals, the parser should recover the unexpected unary plus, and the output should look somewhat like:
Tested on 1.56.0-nightly (2021-08-22 af14075)