]> Cypherpunks.ru repositories - gostls13.git/blobdiff - test/recover3.go
cmd/compile/internal/inline: score call sites exposed by inlines
[gostls13.git] / test / recover3.go
index ebfa0a30757138fbf3e62e7a903b16aa7dc64392..1b26cb36367dcdd206b8b30dd5aad3e371fb9137 100644 (file)
@@ -1,6 +1,6 @@
 // run
 
-// Copyright 2010 The Go Authors.  All rights reserved.
+// Copyright 2010 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
@@ -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{}