authorgravatar for git@vexu.euVeikka Tuominen <git@vexu.eu> 2022-03-27 22:52:28+03:00
committergravatar for git@vexu.euVeikka Tuominen <git@vexu.eu> 2022-03-27 22:57:43+03:00
logd5e89dd70b2b5e26e2457d276ce25125f111b29a
tree8e88cb9832fc976a9d0cc591581dfa33c315d426
parent7217148edf28a0d3ab69b8c36b13d29c023e12fd

stage2: add temporary workaround for lack of argument count check


1 files changed, 6 insertions(+), 2 deletions(-)

src/Sema.zig+6-2
......@@ -3661,8 +3661,12 @@ fn zirParamType(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!A
36613661 fn_ty.fnInfo();
36623662
36633663 if (param_index >= fn_info.param_types.len) {
3664 assert(fn_info.is_var_args);
3665 return sema.addType(Type.initTag(.var_args_param));
3664 if (fn_info.is_var_args) {
3665 return sema.addType(Type.initTag(.var_args_param));
3666 }
3667 // TODO implement begin_call/end_call Zir instructions and check
3668 // argument count before casting arguments to parameter types.
3669 return sema.fail(block, callee_src, "wrong number of arguments", .{});
36663670 }
36673671
36683672 if (fn_info.param_types[param_index].tag() == .generic_poison) {