0
0
mirror of https://github.com/vim/vim.git synced 2025-09-26 04:04:07 -04:00

patch 8.2.1879: Vim9: argument types of insert() not checked when compiling

Problem:    Vim9: argument types of insert() not checked when compiling.
Solution:   Add argument type checks for insert().
This commit is contained in:
Bram Moolenaar
2020-10-21 16:42:22 +02:00
parent 8a99e66b4f
commit ca17453e73
5 changed files with 59 additions and 9 deletions

View File

@@ -1478,7 +1478,7 @@ generate_BCALL(cctx_T *cctx, int func_idx, int argcount, int method_call)
// Check the types of the arguments.
argtypes = ((type_T **)stack->ga_data) + stack->ga_len - argcount;
if (argcount > 0 && internal_func_check_arg_types(
*argtypes, func_idx, argcount) == FAIL)
argtypes, func_idx, argcount) == FAIL)
return FAIL;
if ((isn = generate_instr(cctx, ISN_BCALL)) == NULL)