Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
compiler: Accept numeric literals with leading zeroes.
When a numeric literal with leading zeroes was seen in the parser, it would only be accepted if it were a valid hex or octal literal. Any invalid numeric literal would be split up into multiple tokens: the valid hex/octal literal followed by the rest of the characters. Instead, when scanning a numeric literal with leading zeroes, always accept the number and give an appropriate error if the accepted number does not fit in the expected base. Fixes golang/go#11532, golang/go#11533. Change-Id: I2cac2348a0ab67fe9b97b77476cd7706b63a9db3 Reviewed-on: https://go-review.googlesource.com/13791 Reviewed-by: Ian Lance Taylor <iant@golang.org>
- Loading branch information