Python: Add test for inner return

This commit is contained in:
Rasmus Lerchedahl Petersen
2020-11-25 07:05:26 +01:00
parent 34896ae0d7
commit 36d9097d03

View File

@@ -580,3 +580,12 @@ def test_dynamic_tuple_creation_4():
SINK(tup[0]) # Flow missing
SINK_F(tup[1])
def return_from_inner_scope(x):
try:
return x[0]
except IndexError:
return SOURCE
def test_return_from_inner_scope():
SINK(return_from_inner_scope([]))