summaryrefslogtreecommitdiff
path: root/tests/functional/r/redefine_loop.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/functional/r/redefine_loop.py')
-rw-r--r--tests/functional/r/redefine_loop.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/functional/r/redefine_loop.py b/tests/functional/r/redefine_loop.py
new file mode 100644
index 000000000..012ba136b
--- /dev/null
+++ b/tests/functional/r/redefine_loop.py
@@ -0,0 +1,8 @@
+"""Test case for variable redefined in inner loop."""
+for item in range(0, 5):
+ print("hello")
+ for item in range(5, 10): #[redefined-outer-name]
+ print(item)
+ print("yay")
+ print(item)
+ print("done")