You've already forked godot
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:
@@ -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))
|
||||
@@ -0,0 +1,16 @@
|
||||
GDTEST_OK
|
||||
true
|
||||
-2
|
||||
-2
|
||||
-2
|
||||
1
|
||||
1
|
||||
1
|
||||
-5
|
||||
-1
|
||||
-3
|
||||
0
|
||||
0
|
||||
-255
|
||||
256
|
||||
2
|
||||
Reference in New Issue
Block a user