diff --git a/test/shift1.go b/test/shift1.go index 46867a9334..71f7861c61 100644 --- a/test/shift1.go +++ b/test/shift1.go @@ -49,9 +49,192 @@ var ( f3 = imag(1 << s) // ERROR "invalid" ) +// from the spec +func _() { + var ( + s uint = 33 + i = 1 << s // 1 has type int + j int32 = 1 << s // 1 has type int32; j == 0 + k = uint64(1 << s) // 1 has type uint64; k == 1<<33 + m int = 1.0 << s // 1.0 has type int + n = 1.0<