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/job.c b/src/job.c
index 89d7756..ac35fd1 100644
--- a/src/job.c
+++ b/src/job.c
@@ -1899,6 +1899,12 @@
rettv->v_type = VAR_JOB;
if (check_restricted() || check_secure())
return;
+
+ if (in_vim9script()
+ && (check_for_string_or_list_arg(argvars, 0) == FAIL
+ || check_for_opt_dict_arg(argvars, 1) == FAIL))
+ return;
+
rettv->vval.v_job = job_start(argvars, NULL, NULL, NULL);
}