summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/tests/scripts/runtime/features
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2024-07-09 16:47:20 +0200
committerRémi Verschelde <rverschelde@gmail.com>2024-07-09 16:47:20 +0200
commit92320c9b738e1b01dbca6c354d92de574d626752 (patch)
treea73bd6d92e51a639e60e9815bb24edd491f7a6f9 /modules/gdscript/tests/scripts/runtime/features
parentff8050efda18ffc76bb0414cbca237a94fe06f6c (diff)
parentb4cb7ec2bbc2362f74f200606a9dbd04dd031407 (diff)
downloadredot-engine-92320c9b738e1b01dbca6c354d92de574d626752.tar.gz
Merge pull request #94025 from dalexeev/gds-fix-implicit-cast-typed-array-param
GDScript: Fix implicit cast to typed array when passing parameter
Diffstat (limited to 'modules/gdscript/tests/scripts/runtime/features')
-rw-r--r--modules/gdscript/tests/scripts/runtime/features/typed_array_implicit_cast_param.gd7
-rw-r--r--modules/gdscript/tests/scripts/runtime/features/typed_array_implicit_cast_param.out2
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