cmd/compile: mis-calculates a constant (original) (raw)

For the following program:

package main var f = 7 / "0"[0]

go tool compile says:

tmp.go:2: constant 1197 overflows byte

Now sure where 1197 came from, but it must be 0 and the program must compile successfully.

go version devel +514014c Thu Jun 18 15:54:35 2015 +0200 linux/amd64