-
Notifications
You must be signed in to change notification settings - Fork 18k
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: found illegal assignment #50912
Comments
|
Per internal discussion we are going to disallow this for 1.18: while the type checker can handle this fine and the compiler fix is not hard, it's not clear what the |
Change https://golang.org/cl/382116 mentions this issue: |
Work-around func real64(x any) float64 {
switch z := x.(type) {
case complex64:
return float64(real(z))
case complex128:
return real(z)
default:
panic("unknown complex type")
}
} Similarly for |
Change https://golang.org/cl/381967 mentions this issue: |
For #47694. For #50912. For #50937. Change-Id: I3fae6c8dbbd61a45e669b8fb0c18ac76f2183963 Reviewed-on: https://go-review.googlesource.com/c/go/+/381967 Trust: Robert Griesemer <gri@golang.org> Run-TryBot: Robert Griesemer <gri@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
This is tip already
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
https://gotipplay.golang.org/p/hdcd8wSANJ4
What did you expect to see?
No error, no display.
What did you see instead?
The text was updated successfully, but these errors were encountered: