More tests and better understanding of if/try branches name resolution.

This commit is contained in:
Dave Halter
2016-11-29 10:21:50 +01:00
parent 481a917ada
commit 5b81a2375d
5 changed files with 107 additions and 19 deletions

View File

@@ -1,3 +1,39 @@
# -----------------
# First a few name resolution things
# -----------------
x = 3
if NOT_DEFINED:
x = ''
#? 6 int()
elif x:
pass
else:
#? int()
x
x = 1
try:
x = ''
#? 8 int() str()
except x:
#? 5 int() str()
x
x = 1.0
else:
#? 5 int() str()
x
x = list
finally:
#? 5 int() str() float() list
x
x = tuple
# -----------------
# Return checks
# -----------------
def foo(x):
if 1.0:
return 1