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
7package p
8
9func g() int
10func h(int)
11
12var b bool
13
14func f() {
15	did := g()
16	if !did && b { // ERROR "invalid operation"
17		h(x) // ERROR "undefined"
18	}
19}
20