From b4cb7ec2bbc2362f74f200606a9dbd04dd031407 Mon Sep 17 00:00:00 2001 From: Danil Alexeev Date: Sun, 7 Jul 2024 13:43:09 +0300 Subject: GDScript: Fix implicit cast to typed array when passing parameter --- .../scripts/runtime/features/typed_array_implicit_cast_param.gd | 7 +++++++ .../scripts/runtime/features/typed_array_implicit_cast_param.out | 2 ++ 2 files changed, 9 insertions(+) create mode 100644 modules/gdscript/tests/scripts/runtime/features/typed_array_implicit_cast_param.gd create mode 100644 modules/gdscript/tests/scripts/runtime/features/typed_array_implicit_cast_param.out (limited to 'modules/gdscript/tests/scripts') 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 -- cgit v1.2.3