summaryrefslogtreecommitdiff
path: root/test/recover3.go
diff options
context:
space:
mode:
Diffstat (limited to 'test/recover3.go')
-rw-r--r--test/recover3.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/recover3.go b/test/recover3.go
index ebfa0a307..e17bfb3f6 100644
--- a/test/recover3.go
+++ b/test/recover3.go
@@ -64,7 +64,8 @@ func main() {
i = 99999
var sl []int
- check("array-bounds", func() { println(p[i]) }, "index out of range")
+ p1 := new([10]int)
+ check("array-bounds", func() { println(p1[i]) }, "index out of range")
check("slice-bounds", func() { println(sl[i]) }, "index out of range")
var inter interface{}