0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

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.
This commit is contained in:
Bram Moolenaar
2022-01-16 18:06:21 +00:00
parent dc98776f89
commit c84287d6d8
5 changed files with 31 additions and 8 deletions

View File

@@ -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;
}