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

go/types: fail to reject overflowing shift #12945

Closed
mdempsky opened this issue Oct 15, 2015 · 1 comment
Closed

go/types: fail to reject overflowing shift #12945

mdempsky opened this issue Oct 15, 2015 · 1 comment

Comments

@mdempsky
Copy link
Member

package main
func main() {
    _ = int8(1) << 10
}

cmd/compile says ./foo.go:3: constant 1024 overflows int8

gotype accepts it.

@ianlancetaylor ianlancetaylor added this to the Unplanned milestone Oct 15, 2015
@gopherbot
Copy link

CL https://golang.org/cl/15900 mentions this issue.

@golang golang locked and limited conversation to collaborators Oct 24, 2016
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