We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The program
package p var s uint var a = make([]int, 1<<s + 1.2) // <<< 1.2 truncated to integer! var _ = a[1<<s - 2.3] // <<< 2.3 truncated to integer!
is accepted by go/types without error.
The text was updated successfully, but these errors were encountered:
Simpler repro case:
package p var s uint var _ int = 1<<s + 1.2
Sorry, something went wrong.
Change https://golang.org/cl/65370 mentions this issue: go/types: refuse incorrect shift expressions in certain contexts
go/types: refuse incorrect shift expressions in certain contexts
45395b5
No branches or pull requests
The program
is accepted by go/types without error.
The text was updated successfully, but these errors were encountered: