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: get an internal error when deliberately use '%' operator with int and complex #31110

Closed
Sasasu opened this issue Mar 28, 2019 · 2 comments

Comments

@Sasasu
Copy link

Sasasu commented Mar 28, 2019

What version of Go are you using (go version)?

$ go version
> go version go1.12.1 linux/amd64

Does this issue reproduce with the latest release?

yes

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
> on goplayground

What did you do?

1i % 1 or 1 % 1i

https://play.golang.org/p/SOnbQYQweey

What did you expect to see?

compiler print "use remainder operator between integer and complex value" and exit

or

compiler print "constant %g truncated to real" and exit

What did you see instead?

internal error

@josharian
Copy link
Contributor

cc @mdempsky

@mdempsky
Copy link
Member

Duplicate of #31060.

@golang golang locked and limited conversation to collaborators Mar 27, 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

4 participants