Skip to content

Fix negative literals - #12459

Closed
odersky wants to merge 1 commit into
scala:masterfrom
dotty-staging:fix-neglit
Closed

odersky wants to merge 1 commit into
scala:masterfrom
dotty-staging:fix-neglit

Conversation

@odersky

@odersky odersky commented May 13, 2021

Copy link
Copy Markdown
Contributor

A - followed by a number is considered a literal only if there are no spaces
between the sign and the first digit.

Also, some simplifications how negative numbers are parsed.

A `-` followed by a number is considered a literal only if there are no spaces
between the sign and the first digit.

Also, some simplifications how negative numbers are parsed.
@odersky

odersky commented May 13, 2021

Copy link
Copy Markdown
Contributor Author

@odersky

odersky commented May 23, 2021

Copy link
Copy Markdown
Contributor Author

On reflection, it’s not worth to change things wrt to Scala 2. So we’ll leave it as it is.

@odersky odersky closed this May 23, 2021
@som-snytt

Copy link
Copy Markdown
Contributor

I was prepared to backport because it's a small change and it's good puzzler territory or as they say in french terroir.

Also the alignment with leading infix was elegant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants