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/compile: misleading error message for failed untyped constant conversion #11580

Closed
griesemer opened this issue Jul 3, 2015 · 2 comments
Closed
Labels
FrozenDueToAge Suggested Issues that may be good for new contributors looking for work to do.
Milestone

Comments

@griesemer
Copy link
Contributor

http://play.golang.org/p/KoR8BizdMq

reports:

/tmp/sandbox991543070/main.go:3: constant 0+1i truncated to real

but the error should say: constant 0+1i truncated to int

since the complex constant is used with an int value.

go/types reports: 1i (untyped complex constant (0/1 + 1/1i)) truncated to int

@griesemer griesemer added this to the Unplanned milestone Jul 3, 2015
@griesemer griesemer changed the title cmd/compile: misleading error message in failed untyped constant conversion cmd/compile: misleading error message for failed untyped constant conversion Jul 3, 2015
@griesemer
Copy link
Contributor Author

More direct example: http://play.golang.org/p/KhuZtmdbY2

@ianlancetaylor ianlancetaylor added the Suggested Issues that may be good for new contributors looking for work to do. label Jul 10, 2015
@gopherbot
Copy link

CL https://golang.org/cl/34638 mentions this issue.

@golang golang locked and limited conversation to collaborators Feb 1, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge Suggested Issues that may be good for new contributors looking for work to do.
Projects
None yet
Development

No branches or pull requests

3 participants