Skip to content

Commit ed43b7e

Browse files
await has side-effects
1 parent a165a40 commit ed43b7e

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

python/ql/src/Statements/StatementNoEffect.ql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,8 @@ predicate python2_print(Expr e) {
126126
predicate no_effect(Expr e) {
127127
// strings can be used as comments
128128
not e instanceof StringLiteral and
129+
// await triggers actions and switches coroutines
130+
not e instanceof Await and
129131
not e.hasSideEffects() and
130132
forall(Expr sub | sub = e.getASubExpression*() |
131133
not side_effecting_binary(sub) and

0 commit comments

Comments
 (0)