patch 8.2.3135: Vim9: builtin function arguments not checked at compile time
Problem: Vim9: builtin function arguments not checked at compile time.
Solution: Add more type checks. (Yegappan Lakshmanan, closes #8539)
diff --git a/src/channel.c b/src/channel.c
index 65757f1..c0572d3 100644
--- a/src/channel.c
+++ b/src/channel.c
@@ -1311,6 +1311,11 @@
jobopt_T opt;
channel_T *channel = NULL;
+ if (in_vim9script()
+ && (check_for_string_arg(argvars, 0) == FAIL
+ || check_for_dict_arg(argvars, 1) == FAIL))
+ return NULL;
+
address = tv_get_string(&argvars[0]);
if (argvars[1].v_type != VAR_UNKNOWN
&& (argvars[1].v_type != VAR_DICT || argvars[1].vval.v_dict == NULL))