commit | 5309fae1a344b8a0d4e73a8505bc47e290496ee7 | [log] [tgz] |
---|---|---|
author | Ian Lance Taylor <iant@golang.org> | Tue Aug 31 07:34:01 2010 -0700 |
committer | Ian Lance Taylor <iant@golang.org> | Tue Aug 31 07:34:01 2010 -0700 |
tree | bf2b2e637f5c4a8394b0fed5dc82e773b4766a5f | |
parent | 0f61f0140d4380df86a135d5d8ea89edff9fb278 [diff] [blame] |
test: don't assign address of array to slice. R=rsc CC=golang-dev https://golang.org/cl/2084042
diff --git a/test/fixedbugs/bug146.go b/test/fixedbugs/bug146.go index bfb7529..16324c7 100644 --- a/test/fixedbugs/bug146.go +++ b/test/fixedbugs/bug146.go
@@ -9,7 +9,7 @@ func main() { type Slice []byte; a := [...]byte{ 0 }; - b := Slice(&a); // This should be OK. + b := Slice(a[0:]); // This should be OK. c := Slice(a); // ERROR "invalid|illegal|cannot" _, _ = b, c; }