summaryrefslogtreecommitdiffstats
path: root/src/vim9type.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vim9type.c')
-rw-r--r--src/vim9type.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/vim9type.c b/src/vim9type.c
index 00ee76b487..6a5848792b 100644
--- a/src/vim9type.c
+++ b/src/vim9type.c
@@ -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