Improve type inference for variadic parameters

This commit is contained in:
gingerBill
2019-05-04 14:01:04 +01:00
parent a5ff983266
commit ea1690b7a1
3 changed files with 27 additions and 5 deletions

View File

@@ -107,7 +107,7 @@ void check_init_variables(CheckerContext *ctx, Entity **lhs, isize lhs_count, Ar
// an extra allocation
auto operands = array_make<Operand>(ctx->allocator, 0, 2*lhs_count);
defer (array_free(&operands));
check_unpack_arguments(ctx, lhs, lhs_count, &operands, inits, true);
check_unpack_arguments(ctx, lhs, lhs_count, &operands, inits, true, false);
isize rhs_count = operands.count;
for_array(i, operands) {