GDScript: Fix use of conversion assign for variant values
This commit is contained in:
parent
91713ced81
commit
04d0e851ea
3 changed files with 14 additions and 2 deletions
|
|
@ -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)
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
GDTEST_OK
|
||||
true
|
||||
true
|
||||
Loading…
Add table
Add a link
Reference in a new issue