go/types: can shift complex numbers (original) (raw)

gotype successfully compiles the following program:

package a var a = complex64(1) << 2

gccgo also compiles it. gc rejects it saying:

invalid operation: complex64(1) << 2 (shift of type complex64)

Spec says that lhs of shift must be an integer.