From 6472dea1468e895c21aad98f75e85c67e43f716e Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Sat, 1 Feb 2014 00:55:05 +0200 Subject: Add exception stack unwind support for RETURN_VALUE. This properly implements return from try/finally block(s). TODO: Consider if we need to do any value stack unwinding for RETURN_VALUE case. Intuitively, this is "success" return, so value stack should be in good shape, and unwinding shouldn't be required. --- tests/basics/try-finally-return.py | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 tests/basics/try-finally-return.py (limited to 'tests/basics') diff --git a/tests/basics/try-finally-return.py b/tests/basics/try-finally-return.py new file mode 100644 index 000000000..053fd4b13 --- /dev/null +++ b/tests/basics/try-finally-return.py @@ -0,0 +1,7 @@ +def func1(): + try: + return "it worked" + finally: + print("finally 1") + +print(func1()) -- cgit v1.2.3