1
0
forked from aniani/vim

patch 9.0.2043: Vim9: issue with funcref assignmentand varargs

Problem:  Vim9: issue with funcref assignmentand varargs
Solution: Fix funcref type checking

closes: #13351

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ernie Rael <errael@raelity.com>
This commit is contained in:
Ernie Rael
2023-10-17 18:15:01 +02:00
committed by Christian Brabandt
parent c290009e99
commit 96952b2e98
5 changed files with 127 additions and 1 deletions

View File

@@ -884,6 +884,11 @@ check_type_maybe(
else
ret = MAYBE;
}
if (ret != FAIL
&& ((expected->tt_flags & TTFLAG_VARARGS)
!= (actual->tt_flags & TTFLAG_VARARGS))
&& expected->tt_argcount != -1)
ret = FAIL;
if (ret != FAIL && expected->tt_argcount != -1
&& actual->tt_min_argcount != -1
&& (actual->tt_argcount == -1