Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

for does not loop as expected with variable. #37358

Closed
volzhs opened this issue Mar 27, 2020 · 2 comments · Fixed by #37364
Closed

for does not loop as expected with variable. #37358

volzhs opened this issue Mar 27, 2020 · 2 comments · Fixed by #37364

Comments

@volzhs
Copy link
Contributor

volzhs commented Mar 27, 2020

Godot version:
3.2.2-rc 909e303

OS/device including version:
Linux mint 19.3

Issue description:
for does not loop as expected with variable.

Steps to reproduce:

	var index = 0
	printt(range(index + 1, 3))  # prints [1,2]
	for i in range(index + 1, 3):
		printt("i =", i)  # prints only 'i = 0' and loop ended

Minimal reproduction project:

@volzhs
Copy link
Contributor Author

volzhs commented Mar 27, 2020

it works as expected with da4eb71

@volzhs
Copy link
Contributor Author

volzhs commented Mar 27, 2020

#36859 seems related.
cc @ThakeeNathees @vnen

ThakeeNathees added a commit to ThakeeNathees/godot that referenced this issue Mar 27, 2020
@akien-mga akien-mga added this to the 4.0 milestone Mar 27, 2020
akien-mga added a commit that referenced this issue Mar 28, 2020
akien-mga pushed a commit that referenced this issue Apr 6, 2020
(cherry picked from commit 0b5bad7)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants