Mercurial > vim
diff src/userfunc.c @ 27171:374c7d5a096a v8.2.4114
patch 8.2.4114: Vim9: type checking for a funcref does not work for method
Commit: https://github.com/vim/vim/commit/c84287d6d8dd055bb6e30605465a23a8addb6fde
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Jan 16 18:06:21 2022 +0000
patch 8.2.4114: Vim9: type checking for a funcref does not work for method
Problem: Vim9: type checking for a funcref does not work for when it is
used in a method.
Solution: Pass the base to where the type is checked.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 16 Jan 2022 19:15:03 +0100 |
parents | 98a01021e465 |
children | a10936038ec9 |
line wrap: on
line diff
--- a/src/userfunc.c +++ b/src/userfunc.c @@ -3386,7 +3386,8 @@ call_func( && funcexe->fe_evaluate) { // Check that the argument types are OK for the types of the funcref. - if (check_argument_types(funcexe->fe_check_type, argvars, argcount, + if (check_argument_types(funcexe->fe_check_type, + argvars, argcount, funcexe->fe_basetv, (name != NULL) ? name : funcname) == FAIL) error = FCERR_OTHER; }