Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nuance errors for zero-led literals #9015

Closed
scabug opened this issue Nov 28, 2014 · 4 comments
Closed

Nuance errors for zero-led literals #9015

scabug opened this issue Nov 28, 2014 · 4 comments
Assignees
Milestone

Comments

@scabug
Copy link

scabug commented Nov 28, 2014

The message should specify "decimal integer literals" instead of "integral values." Hex literals often have leading zeros: 0x00FF. Unexpectedly, hex literals are accepted with no leading digits at all:

scala> 0x
res13: Int = 0

Or should one say, "unhexpectedly."

@scabug
Copy link
Author

scabug commented Nov 28, 2014

Imported From: https://issues.scala-lang.org/browse/SI-9015?orig=1
Reporter: @som-snytt
Affected Versions: 2.11.4

@scabug
Copy link
Author

scabug commented Nov 29, 2014

@soc said:
I would be in favor of deprecating this. One less weird thing people new to the language can trip over.

@scabug
Copy link
Author

scabug commented Dec 3, 2014

@som-snytt said:
Instead of "leading zero is not allowed," it should say, "misleading zero is not allowed."

@scabug
Copy link
Author

scabug commented Dec 15, 2014

@som-snytt said:
scala/scala#4182

Quick, before Jira reconfigures itself to defeat our shield modulation!

@scabug scabug closed this as completed Dec 15, 2014
@scabug scabug added this to the 2.11.5 milestone Apr 7, 2017
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

No branches or pull requests

2 participants