]> Cypherpunks.ru repositories - gostls13.git/blobdiff - test/nilcheck.go
cmd/compile/internal/inline: score call sites exposed by inlines
[gostls13.git] / test / nilcheck.go
index ab28b33d41ee359975da4129702f0e42fc0cf7d1..e81db6dcb07eb826081342155a0c0b2cc640c4be 100644 (file)
@@ -1,6 +1,6 @@
 // errorcheck -0 -N -d=nil
 
-// Copyright 2013 The Go Authors.  All rights reserved.
+// Copyright 2013 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.
 
@@ -184,6 +184,7 @@ func f4(x *[10]int) {
 
 func f5(m map[string]struct{}) bool {
        // Existence-only map lookups should not generate a nil check
-       _, ok := m[""]
+       tmp1, tmp2 := m[""] // ERROR "removed nil check"
+       _, ok := tmp1, tmp2
        return ok
 }