diff options
Diffstat (limited to 'test/shift1.go')
| -rw-r--r-- | test/shift1.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/test/shift1.go b/test/shift1.go index 01ecbed53a..df0c032cd5 100644 --- a/test/shift1.go +++ b/test/shift1.go @@ -18,13 +18,13 @@ func h(x float64) int { return 0 } var ( s uint = 33 u = 1.0 << s // ERROR "invalid operation|shift of non-integer operand" - v float32 = 1 << s // ERROR "invalid" "as type float32" + v float32 = 1 << s // ERROR "invalid" ) // non-constant shift expressions var ( - e1 = g(2.0 << s) // ERROR "invalid|shift of non-integer operand" "as type interface" - f1 = h(2 << s) // ERROR "invalid" "as type float64" + e1 = g(2.0 << s) // ERROR "invalid|shift of non-integer operand" + f1 = h(2 << s) // ERROR "invalid" g1 int64 = 1.1 << s // ERROR "truncated" ) @@ -66,6 +66,7 @@ func _() { u2 = 1<<s != 1.0 // ERROR "non-integer|float64" v float32 = 1 << s // ERROR "non-integer|float32" w int64 = 1.0 << 33 // 1.0<<33 is a constant shift expression + _, _, _, _, _, _, _, _, _, _ = j, k, m, n, o, u, u1, u2, v, w ) |
