You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The yield analyzer reports spurious diagnostics for constructs
such as:
func f(yield func() bool) {
ok := yield() // yield may be called again
ok = ok && yield() // yield may be called again
ok = ok && yield()
}
This CL reduces phi(false, yield()) conditions as a special case.
The test suite includes a counterexample that still elicits
a false positive. If variants of this sort show up in practice,
we may need a more systematic treatment of dominating conditions,
similar to the nilness analysis, or even a full monotone framework
with lattice joins and fixed point iteration.
Fixesgolang/go#70598
Change-Id: Ia602602cf5c233820d8ddbe73a286799bb3ea16c
Reviewed-on: https://go-review.googlesource.com/c/tools/+/632117
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Robert Findley <rfindley@google.com>
0 commit comments