GDScript: Make array literal typed if for loop variable type is specified

This commit is contained in:
Danil Alexeev
2023-09-21 11:14:28 +03:00
parent 59139df16e
commit 3c35e7f1d6
5 changed files with 30 additions and 7 deletions

View File

@@ -0,0 +1,5 @@
# GH-82021
func test():
for x: String in [1, 2, 3]:
print(x)

View File

@@ -0,0 +1,2 @@
GDTEST_ANALYZER_ERROR
Cannot include a value of type "int" as "String".