Godot Version
4.4
Question
Hello, I am converting the dictionaries I can from untyped to typed as I convert into 4.4 from 4.3, but are running into the issue I have had often in the past with typed Arrays (Ones like Array[String] not just Array or one of the packed array types) where even if the un-typed contents match it will not allow it to be set. For example;
var my_untyped_array : Array = ["hello", "world!"]
var my_typed_array : Array[String] = []
my_typed_array = my_untyped_array
# ^ Depending on the place this will either not set the typed array,
# set it to an empty array, or crash. Same as Dictionaries.
Is there a way to allow for this to work? By that I mean have Godot convert the untyped to a typed array?
This is especially annoying when reading stored data in something like a Config File as that will just save an Array or Dictionary, without the type. So when trying to load that data it will give up errors, or sometimes when passing into functions I have found it would convert back to an untyped version, the only workaround I have found beside not typing the contents is;
var my_untyped_dict : Dictionary = {"hello": 0, "world!": 1}
var my_typed_dict : Dictionary[String, int] = {}
for key : String in my_untyped_dict.keys():
my_typed_dict[key] = my_untyped_dict[key]
# Same goes for Array's.
Is there a way to allow for it to use the untyped ones when setting the typed variables?
Thanks.