Merge pull request #82030 from dalexeev/gds-make-for-loop-array-literal-typed

GDScript: Make array literal typed if `for` loop variable type is specified
This commit is contained in:
Yuri Sizov
2023-09-28 20:04:12 +02:00
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".