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:
commit
73252669b1
5 changed files with 30 additions and 7 deletions
|
|
@ -0,0 +1,5 @@
|
|||
# GH-82021
|
||||
|
||||
func test():
|
||||
for x: String in [1, 2, 3]:
|
||||
print(x)
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
GDTEST_ANALYZER_ERROR
|
||||
Cannot include a value of type "int" as "String".
|
||||
Loading…
Add table
Add a link
Reference in a new issue