diff options
author | Russ Cox <rsc@golang.org> | 2009-01-06 15:19:02 -0800 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2009-01-06 15:19:02 -0800 |
commit | 5564504507c9b307840a5d13d9700d46e2a8524d (patch) | |
tree | f3f98baba1fdd5e0138a4875884aa85111308b3f /test/complit.go | |
parent | 9662e7b2db0fa8c2bb4d8cf28940116763eedbc9 (diff) | |
download | go-5564504507c9b307840a5d13d9700d46e2a8524d.tar.gz go-5564504507c9b307840a5d13d9700d46e2a8524d.zip |
new new & make
R=r
OCL=22166
CL=22166
Diffstat (limited to 'test/complit.go')
-rw-r--r-- | test/complit.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/complit.go b/test/complit.go index ca3c8e0483..67064fe239 100644 --- a/test/complit.go +++ b/test/complit.go @@ -11,7 +11,7 @@ type T struct { i int; f float; s string; next *T } type R struct { num int } func itor(a int) *R { - r := new(*R); + r := new(R); r.num = a; return r; } @@ -48,7 +48,7 @@ func main() { at := []*T{&t, &t, &t}; if len(at) != 3 { panic("at") } - c := new(chan int); + c := make(chan int); ac := []chan int{c, c, c}; if len(ac) != 3 { panic("ac") } |