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

range() should return Array[int] and not Array #72762

Open
lostptr opened this issue Feb 5, 2023 · 1 comment · May be fixed by #67025
Open

range() should return Array[int] and not Array #72762

lostptr opened this issue Feb 5, 2023 · 1 comment · May be fixed by #67025

Comments

@lostptr
Copy link
Contributor

lostptr commented Feb 5, 2023

Godot version

4.0 beta 17

System information

Windows 10

Issue description

I am having trouble assigning my Array[int] to the return value of range(). I believe this could be more straightfoward since all parameters are converted to int before processing.
Right now, my solution is to just change my array type but that is not ideal.

Steps to reproduce

Create a node and attach the following script:

var my_array: Array[int]

func _ready() -> void:
	my_array = range(5)

Run the project and the following error occours:

Trying to return an array of type "Array" where expected return type is "Array[int]"

Minimal reproduction project

N/A

@Lippanon
Copy link

Lippanon commented Feb 5, 2023

There is already a PR for it, it's awaiting review/approval. #67025

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.

4 participants