Skip to content

x/tools/go/types: compiles invalid program with overflow #11368

Description

@dvyukov

On the following program:

package main
func main() {
    var a = -("0"[0])
    println(a)
}

ssadump -run outputs:

208

The program is invalid and must not be compiled (type of "0"[0] is byte, -byte is an overflow).

on commit e9a746d

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

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions