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

Merge pull request #73363 from dalexeev/gds-fix-min-int-not-representable

GDScript: Fix `MIN_INT` not representable as numeric literal
This commit is contained in:
Rémi Verschelde
2023-06-18 16:27:16 +02:00
4 changed files with 66 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
func test():
print(-9223372036854775808 == (1 << 63))
print(-2)
print(- 2)
print(---2)
print(3 - 2)
print(3-2)
print(3---2)
print(-3 - 2)
print(-3 - -2)
print(-(3 - 2)-2)
print([1, 2, 3][0]-1)
var t = 1
print(t-1)
print(-0xFF)
print(1--0xFF)
print(floor(PI-1))

View File

@@ -0,0 +1,16 @@
GDTEST_OK
true
-2
-2
-2
1
1
1
-5
-1
-3
0
0
-255
256
2