aboutsummaryrefslogtreecommitdiff
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
commit603f9feeecccd70886f6096d7427cfccf794d3de (patch)
tree99f15d6861f16b725962a4e1cee7f6a98ea2846e /test/const3.go
parent9da73612edc47aa10856e8e21a883f17523ee17b (diff)
downloadgo-603f9feeecccd70886f6096d7427cfccf794d3de.tar.gz
go-603f9feeecccd70886f6096d7427cfccf794d3de.zip
gc: another shift bug
Fixes #1316. R=ken2 CC=golang-dev https://golang.org/cl/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 dd5c88958d..9bba6ced0b 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")
+ }
}