1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-12 13:20:55 +00:00

GDScript: Fix use of conversion assign for variant values

This commit is contained in:
George Marques
2023-01-10 20:01:11 -03:00
parent 91713ced81
commit 04d0e851ea
3 changed files with 14 additions and 2 deletions

View File

@@ -0,0 +1,9 @@
# https://github.com/godotengine/godot/issues/71172
func test():
@warning_ignore(narrowing_conversion)
var foo: int = 0.0
print(typeof(foo) == TYPE_INT)
var dict : Dictionary = {"a":0.0}
foo = dict.get("a")
print(typeof(foo) == TYPE_INT)

View File

@@ -0,0 +1,3 @@
GDTEST_OK
true
true