Fix continue in loops
Make sure that continue runs post expression before looping.
This commit is contained in:
parent
9243bd5f3f
commit
18c3caf093
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue