summaryrefslogtreecommitdiff
path: root/test/const3.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2010-12-13 13:42:51 -0500
committerRuss Cox <rsc@golang.org>2010-12-13 13:42:51 -0500
commitbf13ba055a8b4491633045bd1ddca63e76b0a9df (patch)
treefd1f4e7b3d4b0d945b9ea98609196c78bca453db /test/const3.go
parent4906b9f9fb6bebf4532bab7465a71416426f0524 (diff)
downloadgo-bf13ba055a8b4491633045bd1ddca63e76b0a9df.tar.gz
gc: another shift bug
Fixes issue 1316. R=ken2 CC=golang-dev http://codereview.appspot.com/3575042
Diffstat (limited to 'test/const3.go')
-rw-r--r--test/const3.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/const3.go b/test/const3.go
index dd5c88958..9bba6ced0 100644
--- a/test/const3.go
+++ b/test/const3.go
@@ -26,4 +26,10 @@ func main() {
println("type info didn't propagate in const: got", s)
panic("fail")
}
+ x := uint(5)
+ y := float64(uint64(1)<<x) // used to fail to compile
+ if y != 32 {
+ println("wrong y", y)
+ panic("fail")
+ }
}