diff options
author | Danil Alexeev <danil@alexeev.xyz> | 2024-07-07 13:43:09 +0300 |
---|---|---|
committer | Danil Alexeev <danil@alexeev.xyz> | 2024-07-07 13:43:09 +0300 |
commit | b4cb7ec2bbc2362f74f200606a9dbd04dd031407 (patch) | |
tree | ddf78c1effd163efdf44ba10976d372f91da1c58 /modules/gdscript/tests/scripts/runtime | |
parent | b97110cd307e4d78e20bfafe5de6c082194b2cd6 (diff) | |
download | redot-engine-b4cb7ec2bbc2362f74f200606a9dbd04dd031407.tar.gz |
GDScript: Fix implicit cast to typed array when passing parameter
Diffstat (limited to 'modules/gdscript/tests/scripts/runtime')
-rw-r--r-- | modules/gdscript/tests/scripts/runtime/features/typed_array_implicit_cast_param.gd | 7 | ||||
-rw-r--r-- | modules/gdscript/tests/scripts/runtime/features/typed_array_implicit_cast_param.out | 2 |
2 files changed, 9 insertions, 0 deletions
diff --git a/modules/gdscript/tests/scripts/runtime/features/typed_array_implicit_cast_param.gd b/modules/gdscript/tests/scripts/runtime/features/typed_array_implicit_cast_param.gd new file mode 100644 index 0000000000..13f2c3b956 --- /dev/null +++ b/modules/gdscript/tests/scripts/runtime/features/typed_array_implicit_cast_param.gd @@ -0,0 +1,7 @@ +# GH-93990 + +func test_param(array: Array[String]) -> void: + print(array.get_typed_builtin() == TYPE_STRING) + +func test() -> void: + test_param(PackedStringArray()) diff --git a/modules/gdscript/tests/scripts/runtime/features/typed_array_implicit_cast_param.out b/modules/gdscript/tests/scripts/runtime/features/typed_array_implicit_cast_param.out new file mode 100644 index 0000000000..55482c2b52 --- /dev/null +++ b/modules/gdscript/tests/scripts/runtime/features/typed_array_implicit_cast_param.out @@ -0,0 +1,2 @@ +GDTEST_OK +true |