aboutsummaryrefslogtreecommitdiff
path: root/test/shift1.go
diff options
context:
space:
mode:
authorRémy Oudompheng <oudomphe@phare.normalesup.org>2013-03-04 16:51:42 +0100
committerRémy Oudompheng <oudomphe@phare.normalesup.org>2013-03-04 16:51:42 +0100
commita85fce282e779cb8e342b5efafcd2e11eea3f9ce (patch)
tree233344776698d4a99bf9054c18f11c6274e2dea0 /test/shift1.go
parent66a93729767d3c0e0e0bb5c90ae8369e1c06458f (diff)
downloadgo-a85fce282e779cb8e342b5efafcd2e11eea3f9ce.tar.gz
go-a85fce282e779cb8e342b5efafcd2e11eea3f9ce.zip
cmd/gc: simplify and fix defaultlit.
Fixes #4882. Fixes #4936. Fixes #4937. R=golang-dev, dave, daniel.morsing, rsc CC=golang-dev https://golang.org/cl/7432044
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 b33d22ff8e..f1ec0bf587 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"
+)