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

patch 8.2.2306: Vim9: when using function reference type is not checked

Problem:    Vim9: when using function reference type is not checked.
Solution:   When using a function reference lookup the type and check the
            argument types. (issue #7629)
This commit is contained in:
Bram Moolenaar
2021-01-06 21:59:39 +01:00
parent b23279d7a2
commit 32b3f82010
12 changed files with 155 additions and 55 deletions

View File

@@ -1790,9 +1790,9 @@ generate_PCALL(
stack->ga_len + offset];
type_T *expected;
if (varargs && i >= type->tt_min_argcount - 1)
if (varargs && i >= type->tt_argcount - 1)
expected = type->tt_args[
type->tt_min_argcount - 1]->tt_member;
type->tt_argcount - 1]->tt_member;
else
expected = type->tt_args[i];
if (need_type(actual, expected, offset,