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?
to your account
gotype successfully compiles the following program:
var a = complex64(1) << 2
gccgo also compiles it. gc rejects it saying:
invalid operation: complex64(1) << 2 (shift of type complex64)
Spec says that lhs of shift must be an integer.
The text was updated successfully, but these errors were encountered:
@griesemer if my reading of the spec is correct, then we also need to file a bug on gccgo.
Sorry, something went wrong.
This is clearly a go/types bug. Should be trivial to fix and probably should be fixed for 1.5.
The fix is trivial (one missing predicate check). Can safely go in for 1.5 as far as I am concerned.
CL https://golang.org/cl/12045 mentions this issue.
CL https://golang.org/cl/12046 mentions this issue.
go/types: fix internal inInteger operand predicate
Backport of https://go-review.googlesource.com/#/c/12045/
Reviewed-by: Alan Donovan <email@example.com>
Successfully merging a pull request may close this issue.