aboutsummaryrefslogtreecommitdiff
path: root/test/ken/array.go
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2010-08-31 07:34:01 -0700
committerIan Lance Taylor <iant@golang.org>2010-08-31 07:34:01 -0700
commit5309fae1a344b8a0d4e73a8505bc47e290496ee7 (patch)
treebf2b2e637f5c4a8394b0fed5dc82e773b4766a5f /test/ken/array.go
parent0f61f0140d4380df86a135d5d8ea89edff9fb278 (diff)
downloadgo-5309fae1a344b8a0d4e73a8505bc47e290496ee7.tar.xz
test: don't assign address of array to slice.
R=rsc CC=golang-dev https://golang.org/cl/2084042
Diffstat (limited to 'test/ken/array.go')
-rw-r--r--test/ken/array.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/ken/array.go b/test/ken/array.go
index 7785cdf8f6..40209f5da3 100644
--- a/test/ken/array.go
+++ b/test/ken/array.go
@@ -81,8 +81,8 @@ func testpfpf() {
// call ptr dynamic with ptr fixed from new
func testpdpf1() {
a := new([40]int)
- setpd(a)
- res(sumpd(a), 0, 40)
+ setpd(a[0:])
+ res(sumpd(a[0:]), 0, 40)
b := (*a)[5:30]
res(sumpd(b), 5, 30)
@@ -92,8 +92,8 @@ func testpdpf1() {
func testpdpf2() {
var a [80]int
- setpd(&a)
- res(sumpd(&a), 0, 80)
+ setpd(a[0:])
+ res(sumpd(a[0:]), 0, 80)
}
// generate bounds error with ptr dynamic