Source file test/fixedbugs/issue48784.go
1 // errorcheck -e 2 3 // Copyright 2021 The Go Authors. All rights reserved. 4 // Use of this source code is governed by a BSD-style 5 // license that can be found in the LICENSE file. 6 7 package p 8 9 type T struct{} 10 11 var s string 12 var b bool 13 var i int 14 var t T 15 var a [1]int 16 17 var ( 18 _ = s == nil // ERROR "invalid operation:.*mismatched types string and (untyped )?nil" 19 _ = b == nil // ERROR "invalid operation:.*mismatched types bool and (untyped )?nil" 20 _ = i == nil // ERROR "invalid operation:.*mismatched types int and (untyped )?nil" 21 _ = t == nil // ERROR "invalid operation:.*mismatched types T and (untyped )?nil" 22 _ = a == nil // ERROR "invalid operation:.*mismatched types \[1\]int and (untyped )?nil" 23 ) 24