mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-24 08:52:18 +01:00
Require if and while conditions to be effect-free
This commit is contained in:
1 parent
5cca9471ec
commit
df19bcdb03
4 files changed
+16
-28
No files matched your search
@@ -525,8 +525,6 @@ func (q *checker) bcheckIf(n *a.If) error {
|
||||
for n != nil {
|
||||
snap := snapshot(q.facts)
|
||||
// Check the if condition.
|
||||
//
|
||||
// TODO: check that n.Condition() has no side effects.
|
||||
if _, err := q.bcheckExpr(n.Condition(), 0); err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -581,8 +579,6 @@ func (q *checker) bcheckWhile(n *a.While) error {
|
||||
}
|
||||
|
||||
// Check the while condition.
|
||||
//
|
||||
// TODO: check that n.Condition() has no side effects.
|
||||
if _, err := q.bcheckExpr(n.Condition(), 0); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user