Small "not" bug in prior commit

This commit is contained in:
rocky
2019-12-10 16:12:01 -05:00
parent cea2c7e1dc
commit 9b2e22cbaf
3 changed files with 5 additions and 1 deletions

View File

@@ -1,5 +1,7 @@
# Self-checking test.
# Python 3 bug in not detecting the end bounds of if elif.
# RUNNABLE!
def testit(b):
if b == 1:
a = 1

View File

@@ -1,6 +1,8 @@
# Bug in 3.6 and above.
#Not detecting 2nd return is outside of
# if/then. Fix was to ensure COME_FROM
# RUNNABLE!
def return_return_bug(foo):
if foo == 'say_hello':
return "hello"

View File

@@ -80,7 +80,7 @@ class TreeTransform(GenericASTTraversal, object):
if ifstmts_jump == "_ifstmts_jumpl" and ifstmts_jump[0] == "_ifstmts_jump":
ifstmts_jump = ifstmts_jump[0]
elif ifstmts_jump in ("_ifstmts_jump", "ifstmts_jumpl"):
elif ifstmts_jump not in ("_ifstmts_jump", "ifstmts_jumpl"):
return node
stmts = ifstmts_jump[0]
else: