Python: Extend unreachable statement test

Adds a test demostrating the false positive observed by andersfugmann.

Note that this does not change the `.expected` file, and so the tests
will fail. This is expected.
This commit is contained in:
Taus
2022-01-05 16:45:38 +00:00
committed by GitHub
parent bf0ecded04
commit 5d4db3af15

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