From d796fc75b2a57a760c6f6743e4cc38143b588786 Mon Sep 17 00:00:00 2001 From: Nigel Tao Date: Sat, 7 Jul 2018 19:21:01 +1000 Subject: [PATCH] Have Iterate bounds checking call bcheckBlock --- lang/check/bounds.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lang/check/bounds.go b/lang/check/bounds.go index 97b57bdb..b328c053 100644 --- a/lang/check/bounds.go +++ b/lang/check/bounds.go @@ -269,10 +269,8 @@ func (q *checker) bcheckStatement(n *a.Node) error { v := o.AsVar() q.facts = append(q.facts, makeSliceLengthEqEq(v.Name(), v.XType(), n.Length())) } - for _, o := range n.Body() { - if err := q.bcheckStatement(o); err != nil { - return err - } + if err := q.bcheckBlock(n.Body()); err != nil { + return err } }