Mercurial > vim
diff src/userfunc.c @ 21969:ba2415df82d7 v8.2.1534
patch 8.2.1534: Vim9: type error for argument type is not at call position
Commit: https://github.com/vim/vim/commit/ee8580e52e767916e2a95e8ac0732fd8a5ae0651
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Aug 28 17:19:07 2020 +0200
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)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 28 Aug 2020 17:30:04 +0200 |
parents | a211bca98bc3 |
children | 3fe594c72d8c |
line wrap: on
line diff
--- a/src/userfunc.c +++ b/src/userfunc.c @@ -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; }