diff options
Diffstat (limited to 'types.c')
-rw-r--r-- | types.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1217,7 +1217,9 @@ static Status call_arg_param_order(FnExpr *fn, Type *fn_type, Argument *args, Lo arr_foreach(fn->params, Declaration, decl) { arr_foreach(decl->idents, Identifier, ident) { if (order[param_idx] == -1) { - if (!(decl->flags & DECL_HAS_EXPR) && !(decl->flags & DECL_INFER)) { + if (type_is_builtin(&decl->type, BUILTIN_VARARGS)) { + order[param_idx] = (I16)nargs; + } else if (!(decl->flags & DECL_HAS_EXPR) && !(decl->flags & DECL_INFER)) { char *s = ident_to_str(*ident); err_print(where, "Parameter #%lu (%s) was not set in function call.", param_idx+1, s); free(s); |