summaryrefslogtreecommitdiff
path: root/test/shift1.go
diff options
context:
space:
mode:
Diffstat (limited to 'test/shift1.go')
-rw-r--r--test/shift1.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/shift1.go b/test/shift1.go
index b33d22ff8..f1ec0bf58 100644
--- a/test/shift1.go
+++ b/test/shift1.go
@@ -36,3 +36,10 @@ var (
b2 = 1.0 << c // ERROR "overflow"
d2 = f(1.0 << c) // ERROR "overflow"
)
+
+var (
+ // issues 4882, 4936.
+ a3 = 1.0<<s + 0 // ERROR "invalid operation|shift of non-integer operand"
+ // issue 4937
+ b3 = 1<<s + 1 + 1.0 // ERROR "invalid operation|shift of non-integer operand"
+)