patch 8.2.3206: Vim9: argument types are not checked at compile time
Problem: Vim9: argument types are not checked at compile time.
Solution: Add several more type checks. (Yegappan Lakshmanan, closes #8611)
diff --git a/src/filepath.c b/src/filepath.c
index 0d59a6b..900c5bd 100644
--- a/src/filepath.c
+++ b/src/filepath.c
@@ -2180,6 +2180,12 @@
if (check_secure())
return;
+ if (in_vim9script()
+ && (check_for_list_or_blob_arg(argvars, 0) == FAIL
+ || check_for_string_arg(argvars, 1) == FAIL
+ || check_for_opt_string_arg(argvars, 2) == FAIL))
+ return;
+
if (argvars[0].v_type == VAR_LIST)
{
list = argvars[0].vval.v_list;