You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-10 13:00:37 +00:00
GDScript: Make array literal typed if for loop variable type is specified
This commit is contained in:
@@ -21,6 +21,12 @@ func test():
|
||||
var elem := e
|
||||
prints(var_to_str(e), var_to_str(elem))
|
||||
|
||||
# GH-82021
|
||||
print("Test implicitly typed array literal.")
|
||||
for e: float in [100, 200, 300]:
|
||||
var elem := e
|
||||
prints(var_to_str(e), var_to_str(elem))
|
||||
|
||||
print("Test String-keys dictionary.")
|
||||
var d1 := {a = 1, b = 2, c = 3}
|
||||
for k: StringName in d1:
|
||||
|
||||
@@ -15,6 +15,10 @@ Test typed int array.
|
||||
10.0 10.0
|
||||
20.0 20.0
|
||||
30.0 30.0
|
||||
Test implicitly typed array literal.
|
||||
100.0 100.0
|
||||
200.0 200.0
|
||||
300.0 300.0
|
||||
Test String-keys dictionary.
|
||||
&"a" &"a"
|
||||
&"b" &"b"
|
||||
|
||||
Reference in New Issue
Block a user