summaryrefslogtreecommitdiff
path: root/tests/functional/l/loopvar_in_dict_comp_py27.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/functional/l/loopvar_in_dict_comp_py27.py')
-rw-r--r--tests/functional/l/loopvar_in_dict_comp_py27.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/functional/l/loopvar_in_dict_comp_py27.py b/tests/functional/l/loopvar_in_dict_comp_py27.py
new file mode 100644
index 000000000..072ea1bf5
--- /dev/null
+++ b/tests/functional/l/loopvar_in_dict_comp_py27.py
@@ -0,0 +1,8 @@
+"""Tests for loopvar-in-closure."""
+
+__revision__ = 0
+
+
+def bad_case():
+ """Loop variable from dict comprehension."""
+ return {x: lambda: x for x in range(10)} # [cell-var-from-loop]