1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-05 12:10:55 +00:00

[GDScript] Fix range helper method using 32-bit ints for arguments.

This commit is contained in:
Pāvels Nadtočajevs
2025-08-07 00:00:56 +03:00
parent 80a219a58a
commit b21e6529e6
3 changed files with 33 additions and 13 deletions

View File

@@ -0,0 +1,13 @@
func test():
# GH-109376
# Note: unlike "for range", which is iterated in place, this helper function generates an array of all values in range.
var result
result = range(2147483640, 2147483647) # Range below 32-bit size limit.
print(result)
result = range(2147483640, 2147483647 + 1) # Range 1 over 32-bit size limit.
print(result)
result = range(9922147483640, 9922147483647) # Range significantly over 32-bit size limit.
print(result)

View File

@@ -0,0 +1,4 @@
GDTEST_OK
[2147483640, 2147483641, 2147483642, 2147483643, 2147483644, 2147483645, 2147483646]
[2147483640, 2147483641, 2147483642, 2147483643, 2147483644, 2147483645, 2147483646, 2147483647]
[9922147483640, 9922147483641, 9922147483642, 9922147483643, 9922147483644, 9922147483645, 9922147483646]