Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6a73479

Browse files
committed
Python: Modernise py/loop-variable-capture
1 parent 5cea452 commit 6a73479

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

python/ql/src/Variables/LoopVariableCapture.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ predicate escaping_capturing_looping_construct(CallableExpr capturing, AstNode l
3434
and
3535
// Escapes if used out side of for loop or is a lambda in a comprehension
3636
(
37-
exists(Expr e, For forloop | forloop = loop and e.refersTo(_, _, capturing) | not forloop.contains(e))
37+
exists(Expr e, For forloop | forloop = loop and e.pointsTo(_, _, capturing) | not forloop.contains(e))
3838
or
3939
loop.(Comp).getElt() = capturing
4040
or

0 commit comments

Comments
 (0)