summaryrefslogtreecommitdiffstatshomepage
path: root/tests/bytecode/mp-tests/closure4.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/bytecode/mp-tests/closure4.py')
-rw-r--r--tests/bytecode/mp-tests/closure4.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/bytecode/mp-tests/closure4.py b/tests/bytecode/mp-tests/closure4.py
new file mode 100644
index 0000000000..6828f89008
--- /dev/null
+++ b/tests/bytecode/mp-tests/closure4.py
@@ -0,0 +1,13 @@
+# test when a function has cell and free vars
+
+def f():
+ f_local = 1
+ f_cell = 2
+
+ def g():
+ g_local = 3
+ g_cell = f_cell + 4
+
+ def h():
+ h1_local = 4
+ h2_local = f_cell + g_cell