From 58e21ddaf9498462acb5c552c48e0c52073e1db3 Mon Sep 17 00:00:00 2001
From: Robert Griesemer int
if it cannot
-be determined from the context (for instance, if the shift expression is an
-operand in a comparison against an untyped constant).
+replaced by its left operand alone.
@@ -2916,10 +2914,12 @@ var i = 1<<s // 1 has type int var j int32 = 1<<s // 1 has type int32; j == 0 var k = uint64(1<<s) // 1 has type uint64; k == 1<<33 var m int = 1.0<<s // 1.0 has type int -var n = 1.0<<s != 0 // 1.0 has type int; n == false if ints are 32bits in size +var n = 1.0<<s != i // 1.0 has type int; n == false if ints are 32bits in size var o = 1<<s == 2<<s // 1 and 2 have type int; o == true if ints are 32bits in size var p = 1<<s == 1<<33 // illegal if ints are 32bits in size: 1 has type int, but 1<<33 overflows int var u = 1.0<<s // illegal: 1.0 has type float64, cannot shift +var u1 = 1.0<<s != 0 // illegal: 1.0 has type float64, cannot shift +var u2 = 1<<s != 1.0 // illegal: 1 has type float64, cannot shift var v float32 = 1<<s // illegal: 1 has type float32, cannot shift var w int64 = 1.0<<33 // 1.0<<33 is a constant shift expression-- 2.50.0