Merge pull request #7518 from tausbn/python-extend-unreachable-statement-test

Python: Extend unreachable statement test
This commit is contained in:
Rasmus Wriedt Larsen
2022-01-06 14:07:29 +01:00
committed by GitHub

View File

@@ -0,0 +1,10 @@
# FP involving global variables modified in a different scope
i = 0
def update_i():
global i
i = i + 1
update_i()
if i > 0:
print("i is greater than 0") # FP: This is reachable