-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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: real and imag don't produce untyped results for untyped constant arguments #11945
Labels
Milestone
Comments
CL https://golang.org/cl/12860 mentions this issue. |
mk0x9
pushed a commit
to mk0x9/go
that referenced
this issue
Aug 5, 2015
…'imag' For golang#11669, golang#11540, golang#11945, golang#11946, golang#11947. Change-Id: Ifb0053c498cee9f3473c396f9338d82bd856c110 Reviewed-on: https://go-review.googlesource.com/12860 Reviewed-by: Russ Cox <rsc@golang.org> Reviewed-by: Rob Pike <r@golang.org>
quentinmit
added
the
NeedsFix
The path to resolution is known, but the work has not been done.
label
Oct 11, 2016
CL https://golang.org/cl/45076 mentions this issue. |
gopherbot
pushed a commit
that referenced
this issue
Jun 7, 2017
Prep work for issues mentioned below. No semantic or functionality change. For #11945. For #17446. Change-Id: Ia1bb2b87647a6daa47f7863c0eb42cf5e1d35a7c Reviewed-on: https://go-review.googlesource.com/45076 Reviewed-by: Matthew Dempsky <mdempsky@google.com>
CL https://golang.org/cl/45081 mentions this issue. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
=>
(same for use of imag instead of real).
It appears that real and imag always produce a float32 or float64 constant respectively, for untyped constant arguments. The spec is not explicit about this, but this behavior violates the invariant
for untyped constants z because real and imag won't work if the complex arguments have untyped constant components outside the float64 domain (see also #11540 ).
Both gc, and go/types accept this code. Both gc and go/types produce an untyped floating-point constant for untyped constant arguments.
The text was updated successfully, but these errors were encountered: