summaryrefslogtreecommitdiffstats
path: root/src/vim9type.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vim9type.c')
-rw-r--r--src/vim9type.c20
1 files changed, 5 insertions, 15 deletions
diff --git a/src/vim9type.c b/src/vim9type.c
index 85f9bd8347..81b0db22df 100644
--- a/src/vim9type.c
+++ b/src/vim9type.c
@@ -514,25 +514,15 @@ check_type(type_T *expected, type_T *actual, int give_msg, int argidx)
}
/*
- * Like check_type() but also allow for a runtime type check. E.g. "any" can be
- * used for "number".
- */
- int
-check_arg_type(type_T *expected, type_T *actual, int argidx)
-{
- if (check_type(expected, actual, FALSE, 0) == OK
- || use_typecheck(actual, expected))
- return OK;
- // TODO: should generate a TYPECHECK instruction.
- return check_type(expected, actual, TRUE, argidx);
-}
-
-/*
* Check that the arguments of "type" match "argvars[argcount]".
* Return OK/FAIL.
*/
int
-check_argument_types(type_T *type, typval_T *argvars, int argcount, char_u *name)
+check_argument_types(
+ type_T *type,
+ typval_T *argvars,
+ int argcount,
+ char_u *name)
{
int varargs = (type->tt_flags & TTFLAG_VARARGS) ? 1 : 0;
int i;