diff options
author | Russ Cox <rsc@golang.org> | 2010-08-03 00:26:02 -0700 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2010-08-03 00:26:02 -0700 |
commit | 9bac9d23d3098d692b8ac8b1991ba476afeb5cd2 (patch) | |
tree | 2ff5d619bffae8dc9491588c808abd2ac8c78e1f /test/recover2.go | |
parent | 0cd877725597a9e7c35afdcdb1dbcd1c2c4264b8 (diff) | |
download | go-9bac9d23d3098d692b8ac8b1991ba476afeb5cd2.tar.gz go-9bac9d23d3098d692b8ac8b1991ba476afeb5cd2.zip |
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
https://golang.org/cl/1848056
Diffstat (limited to 'test/recover2.go')
-rw-r--r-- | test/recover2.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/test/recover2.go b/test/recover2.go index 496909f352..c95af8f62f 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() { |