From 93bb7dffd2a655dd8522114ed014077fb6b7ada7 Mon Sep 17 00:00:00 2001 From: Damien George Date: Mon, 1 Feb 2016 16:07:21 +0000 Subject: py/vm: Fix popping of exception block in UNWIND_JUMP opcode. Fixes issue #1812. --- tests/basics/try_continue.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 tests/basics/try_continue.py (limited to 'tests') diff --git a/tests/basics/try_continue.py b/tests/basics/try_continue.py new file mode 100644 index 000000000..4a199b8a3 --- /dev/null +++ b/tests/basics/try_continue.py @@ -0,0 +1,13 @@ +# test continue within exception handler + +def f(): + lst = [1, 2, 3] + for x in lst: + print('a', x) + try: + if x == 2: + raise Exception + except Exception: + continue + print('b', x) +f() -- cgit v1.2.3