0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

patch 8.2.1534: Vim9: type error for argument type is not at call position

Problem:    Vim9: type error for argument type is not at call position.
Solution:   Set the context and stack after checking the arguments.
            (issue #6785)
This commit is contained in:
Bram Moolenaar
2020-08-28 17:19:07 +02:00
parent 6a950581da
commit ee8580e52e
4 changed files with 19 additions and 10 deletions

View File

@@ -1314,17 +1314,10 @@ call_user_func(
if (fp->uf_def_status != UF_NOT_COMPILED)
{
estack_push_ufunc(fp, 1);
save_current_sctx = current_sctx;
current_sctx = fp->uf_script_ctx;
// Execute the function, possibly compiling it first.
call_def_function(fp, argcount, argvars, funcexe->partial, rettv);
--depth;
current_funccal = fc->caller;
estack_pop();
current_sctx = save_current_sctx;
free_funccal(fc);
return;
}