diff options
Diffstat (limited to 'src/evalfunc.c')
-rw-r--r-- | src/evalfunc.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/evalfunc.c b/src/evalfunc.c index bdfd6325fe..2cd1985a06 100644 --- a/src/evalfunc.c +++ b/src/evalfunc.c @@ -282,7 +282,11 @@ arg_number(type_T *type, type_T *decl_type UNUSED, argcontext_T *context) static int arg_object(type_T *type, type_T *decl_type UNUSED, argcontext_T *context) { - return check_arg_type(&t_object, type, context); + if (type->tt_type == VAR_OBJECT + || type_any_or_unknown(type)) + return OK; + arg_type_mismatch(&t_object, type, context->arg_idx + 1); + return FAIL; } /* |