The ORANGE structure that is being replaced by this CL was causing
trouble with another CL (CL 275695).
The problem occurs if you typecheck i in the middle of generating the
body of the ORANGE loop. If you typecheck i, it ends up typechecking
its definition, which secretly typechecks the containing ORANGE. If
you then add other items to the ORANGE body, those items will never
get typechecked, as the ORANGE is already marked as typechecked.
Instead, just steal the loop we use for the equality code. Might as
well use the same pattern in both places.
Change-Id: Idb1ac77881d2cc9da08c7437a652b50d3ee45e2e
Reviewed-on: https://go-review.googlesource.com/c/go/+/275713
Trust: Keith Randall <khr@golang.org>
Trust: Dan Scales <danscales@google.com>
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Dan Scales <danscales@google.com>