x/tools/go/types: compiles invalid program with overflow (original) (raw)

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