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

cmd/gofmt: prefixes/exponents of imaginary literals don't get canonicalized #32718

Closed
griesemer opened this issue Jun 21, 2019 · 2 comments
Closed

Comments

@griesemer
Copy link
Contributor

The latest version of gofmt canonicalizes number literal prefixes and exponent letters (to use lower case letters). It misses imaginary literals.

const (
	_ = 0X0i
	_ = 1.2E3i
)

remains unchanged but should become

const (
	_ = 0x0i
	_ = 1.2e3i
)

for consistency.

(cc: @ianlancetaylor)

@griesemer griesemer added this to the Go1.13 milestone Jun 21, 2019
@griesemer griesemer self-assigned this Jun 21, 2019
@griesemer
Copy link
Contributor Author

I will fix this tonight or tomorrow morning.

@gopherbot
Copy link

Change https://golang.org/cl/183378 mentions this issue: cmd/gofmt: fix normalization of imaginary number literals

@golang golang locked and limited conversation to collaborators Jun 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants