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
Assignees
Milestone

Comments

@mdempsky
Copy link
Member

@mdempsky mdempsky commented Oct 15, 2015

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

@gopherbot gopherbot commented Oct 15, 2015

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

Loading

@mdempsky mdempsky closed this in e538e1b Oct 19, 2015
@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
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants