1
0
forked from aniani/vim

patch 8.2.3104: Vim9: unspecified function type causes type error

Problem:    Vim9: unspecified function type causes type error.
Solution:   Don't check type when min_argcount is negative. (issue #8492)
This commit is contained in:
Bram Moolenaar
2021-07-04 18:28:15 +02:00
parent f33cae6050
commit b7480cd893
4 changed files with 13 additions and 1 deletions

View File

@@ -526,6 +526,7 @@ check_type(type_T *expected, type_T *actual, int give_msg, where_T where)
ret = check_type(expected->tt_member, actual->tt_member,
FALSE, where);
if (ret == OK && expected->tt_argcount != -1
&& actual->tt_min_argcount != -1
&& (actual->tt_argcount == -1
|| (actual->tt_argcount < expected->tt_min_argcount
|| actual->tt_argcount > expected->tt_argcount)))