summaryrefslogtreecommitdiff
path: root/test/recover2.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2010-08-03 00:26:02 -0700
committerRuss Cox <rsc@golang.org>2010-08-03 00:26:02 -0700
commit7c9fbe00e4b2b8b6a07701f6ac40cff6828acf52 (patch)
tree364e3a7ece4e689b0f5feb3916765e2bfd83ce41 /test/recover2.go
parente8668c5c68fe80f4d48cea2c747245d5993eef5c (diff)
downloadgo-7c9fbe00e4b2b8b6a07701f6ac40cff6828acf52.tar.gz
gc: index bounds tests and fixes
move constant index checking to front end x[2:1] is a compile-time error now too R=ken2 CC=golang-dev http://codereview.appspot.com/1848056
Diffstat (limited to 'test/recover2.go')
-rw-r--r--test/recover2.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/recover2.go b/test/recover2.go
index 496909f35..c95af8f62 100644
--- a/test/recover2.go
+++ b/test/recover2.go
@@ -52,7 +52,9 @@ func test2() {
func test3() {
defer mustRecover("slice")
- println(x[11:9])
+ var lo = 11
+ var hi = 9
+ println(x[lo:hi])
}
func test4() {