Skip to content

go/types: int overflow in switch expression #11667

Closed
@dvyukov

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions