Skip to content
Snippets Groups Projects
Commit 5fba93a2 authored by Damien George's avatar Damien George
Browse files

tests: Add test for semantics of for-loop that optimisation can break.

parent c33ce606
No related branches found
No related tags found
No related merge requests found
# test assigning to iterator within the loop
for i in range(2):
print(i)
i = 2
# test assigning to range parameter within the loop
# (since we optimise for loops, this needs checking, currently it fails)
#n = 2
#for i in range(n):
# print(i)
# n = 0
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment