diff options
author | Tianon Gravi <admwiggin@gmail.com> | 2015-01-15 11:54:00 -0700 |
---|---|---|
committer | Tianon Gravi <admwiggin@gmail.com> | 2015-01-15 11:54:00 -0700 |
commit | f154da9e12608589e8d5f0508f908a0c3e88a1bb (patch) | |
tree | f8255d51e10c6f1e0ed69702200b966c9556a431 /test/live2.go | |
parent | 8d8329ed5dfb9622c82a9fbec6fd99a580f9c9f6 (diff) | |
download | golang-upstream/1.4.tar.gz |
Imported Upstream version 1.4upstream/1.4
Diffstat (limited to 'test/live2.go')
-rw-r--r-- | test/live2.go | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/test/live2.go b/test/live2.go index 1e3279402..ef6ad994c 100644 --- a/test/live2.go +++ b/test/live2.go @@ -1,4 +1,4 @@ -// errorcheck -0 -live +// errorcheck -0 -live -wb=0 // Copyright 2014 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style @@ -17,9 +17,8 @@ type T40 struct { } func newT40() *T40 { - ret := T40{ // ERROR "live at call to makemap: &ret" - make(map[int]int), - } + ret := T40{} + ret.m = make(map[int]int) // ERROR "live at call to makemap: &ret" return &ret } @@ -30,9 +29,8 @@ func bad40() { } func good40() { - ret := T40{ // ERROR "live at call to makemap: ret" - make(map[int]int), - } + ret := T40{} + ret.m = make(map[int]int) // ERROR "live at call to makemap: ret" t := &ret println() // ERROR "live at call to printnl: ret" _ = t |