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
Assignees
Milestone

Comments

@griesemer
Copy link
Contributor

@griesemer griesemer commented Jun 21, 2019

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

@griesemer griesemer commented Jun 21, 2019

I will fix this tonight or tomorrow morning.

@gopherbot
Copy link

@gopherbot gopherbot commented Jun 21, 2019

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

@gopherbot gopherbot closed this in 41b9e99 Jun 21, 2019
@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
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.