GDScript: Fix usage of enum value as range argument

This commit is contained in:
Dmitrii Maganov
2023-02-23 03:25:26 +02:00
parent 19c9fd6926
commit 7ee011051a
3 changed files with 21 additions and 14 deletions

View File

@@ -0,0 +1,9 @@
enum E { E0 = 0, E3 = 3 }
func test():
var total := 0
for value in range(E.E0, E.E3):
var inferable := value
total += inferable
assert(total == 0 + 1 + 2)
print('ok')

View File

@@ -0,0 +1,2 @@
GDTEST_OK
ok