Skip to content

Commit 3e1dcc3

Browse files
authored
Merge pull request #7518 from tausbn/python-extend-unreachable-statement-test
Python: Extend unreachable statement test
2 parents ea538a1 + 5d4db3a commit 3e1dcc3

File tree

1 file changed

+10
-0
lines changed
  • python/ql/test/query-tests/Statements/unreachable

1 file changed

+10
-0
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# FP involving global variables modified in a different scope
2+
3+
i = 0
4+
def update_i():
5+
global i
6+
i = i + 1
7+
8+
update_i()
9+
if i > 0:
10+
print("i is greater than 0") # FP: This is reachable

0 commit comments

Comments
 (0)