Fix continue in loops

Make sure that continue runs post expression
before looping.
This commit is contained in:
Luke Hoban 2017-07-19 14:16:55 -07:00 committed by joeduffy
parent 9243bd5f3f
commit 18c3caf093

View file

@ -1058,7 +1058,7 @@ func (e *evaluator) evalLoop(condition *ast.Expression, body ast.Statement, post
if uw := e.evalStatement(body); uw != nil {
if uw.Continue() {
contract.Assertf(uw.Label() == nil, "Labeled continue not yet supported")
continue
// continue through to evaluate the post expression
} else if uw.Break() {
contract.Assertf(uw.Label() == nil, "Labeled break not yet supported")
break