Source file test/fixedbugs/issue45804.go
1 // errorcheck 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 func g() int 10 func h(int) 11 12 var b bool 13 14 func f() { 15 did := g() 16 if !did && b { // ERROR "invalid operation" 17 h(x) // ERROR "undefined" 18 } 19 } 20