You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The correct behavior would be to spit out an error something like % operator not defined for complex numbers.
What did you see instead?
./prog.go:8:16: internal compiler error: binaryOp: bad operation: 1i % 1
Please file a bug report including a short program that triggers the error.
https://golang.org/issue/new
Go build failed.
Notes
This only appears to happen for inline constant expressions. When breaking it up with variables, it spits out a proper error.
The text was updated successfully, but these errors were encountered:
odeke-em
changed the title
cmd/compile: internal compiler error on complex modulo
cmd/compile: internal compiler error on complex modulo instead of compilation failure
Aug 4, 2019
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes I think.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I forgot whether the spec allows modulo on complex numbers (and I now know it does not), so I tried it on the playground.
https://play.golang.org/p/erbCFy39DAy
What did you expect to see?
The correct behavior would be to spit out an error something like
% operator not defined for complex numbers
.What did you see instead?
Notes
This only appears to happen for inline constant expressions. When breaking it up with variables, it spits out a proper error.
The text was updated successfully, but these errors were encountered: