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
+1 -1
View File
@@ -1247,7 +1247,7 @@ void check_stmt_internal(CheckerContext *ctx, Ast *node, u32 flags) {
auto operands = array_make<Operand>(heap_allocator(), 0, 2*rs->results.count);
defer (array_free(&operands));
check_unpack_arguments(ctx, result_entities, result_count, &operands, rs->results, true);
check_unpack_arguments(ctx, result_entities, result_count, &operands, rs->results, true, false);
if (result_count == 0 && rs->results.count > 0) {
error(rs->results[0], "No return values expected");