diff --git a/test/bytecode_3.4/05_while1_if_continue.pyc b/test/bytecode_3.4/05_while1_if_continue.pyc index cc21907e..5e6785a4 100644 Binary files a/test/bytecode_3.4/05_while1_if_continue.pyc and b/test/bytecode_3.4/05_while1_if_continue.pyc differ diff --git a/test/simple_source/bug34/05_while1_if_continue.py b/test/simple_source/bug34/05_while1_if_continue.py index 7a62de54..9111a083 100644 --- a/test/simple_source/bug34/05_while1_if_continue.py +++ b/test/simple_source/bug34/05_while1_if_continue.py @@ -15,3 +15,13 @@ def readline(b): assert readline(None) == 1 assert readline([2]) == 2 + +def readline2(self): + while True: + line = 5 + if self[0]: + if self: + self[0] = 1 + continue + + return line + self[0] diff --git a/uncompyle6/parsers/parse34.py b/uncompyle6/parsers/parse34.py index df1fb6fa..eca7cff1 100644 --- a/uncompyle6/parsers/parse34.py +++ b/uncompyle6/parsers/parse34.py @@ -34,6 +34,8 @@ class Python34Parser(Python33Parser): # Seems to be needed starting 3.4.4 or so while1stmt ::= SETUP_LOOP l_stmts COME_FROM JUMP_BACK POP_BLOCK COME_FROM_LOOP + while1stmt ::= SETUP_LOOP l_stmts + POP_BLOCK COME_FROM_LOOP # FIXME the below masks a bug in not detecting COME_FROM_LOOP # grammar rules with COME_FROM -> COME_FROM_LOOP already exist