Passing an untyped array, ie. Array to a constructor that expects a typed array, ex. Array[int] in a tool script causes Error constructing a GDScriptInstance.. I don't know if it should accept it, but it should at least give a better error message.
Specific error messages:
Error constructing a GDScriptInstance.
res://something.gd:12 - Invalid type in function 'new' in base 'GDScript'. The array of argument 1 (Array) does not have the same element type as the expected typed array argument.
Steps to reproduce
Load the project or reload the scene containing the tool script to see the error message.
Godot version
v4.2.beta.custom_build [fd33c7b32], v4.1.2.stable.official [399c9dc39]
System information
Godot v4.1.2.stable & v4.2.beta - Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1060 (NVIDIA; 31.0.15.3114) - Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz (12 Threads)
Issue description
Passing an untyped array, ie.
Array
to a constructor that expects a typed array, ex.Array[int]
in a tool script causesError constructing a GDScriptInstance.
. I don't know if it should accept it, but it should at least give a better error message.Specific error messages:
Steps to reproduce
Load the project or reload the scene containing the tool script to see the error message.
Minimal reproduction project
Test.zip