go/scanner: scanNumber() method produces inconsistent error message #59441
Labels
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes, it's
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I ran the code snippets listed below to check the error message printed by the number parser. The test targets octal numbers, but it is valid for other number systems as well. As you can see the error message is varies depending on the invalid value being in the decimal range or not.
1- In decimal range.
2- In the hex range.
What did you expect to see?
1- Output:
2- Output:
What did you see instead?
1- Output:
2- Output:
The text was updated successfully, but these errors were encountered: