Skip to content

go/types: int overflow in switch expression #11667

Description

@dvyukov

gotype successfully compiles the following program:

package a
func f() {
    switch 9223372036854775808 {
    }
}

gc rejects it with:

go.go:3: constant 9223372036854775808 overflows int

gc seems to be right.

on commit af81789

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions