Fix continue in loops
Make sure that continue runs post expression before looping.
This commit is contained in:
parent
9243bd5f3f
commit
18c3caf093
1 changed files with 1 additions and 1 deletions
|
@ -1058,7 +1058,7 @@ func (e *evaluator) evalLoop(condition *ast.Expression, body ast.Statement, post
|
||||||
if uw := e.evalStatement(body); uw != nil {
|
if uw := e.evalStatement(body); uw != nil {
|
||||||
if uw.Continue() {
|
if uw.Continue() {
|
||||||
contract.Assertf(uw.Label() == nil, "Labeled continue not yet supported")
|
contract.Assertf(uw.Label() == nil, "Labeled continue not yet supported")
|
||||||
continue
|
// continue through to evaluate the post expression
|
||||||
} else if uw.Break() {
|
} else if uw.Break() {
|
||||||
contract.Assertf(uw.Label() == nil, "Labeled break not yet supported")
|
contract.Assertf(uw.Label() == nil, "Labeled break not yet supported")
|
||||||
break
|
break
|
||||||
|
|
Loading…
Reference in a new issue