mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 07:38:48 +00:00
Fix #795
This commit is contained in:
+1
-2
@@ -1636,8 +1636,7 @@ void check_stmt_internal(CheckerContext *ctx, Ast *node, u32 flags) {
|
|||||||
} else if (operands.count != result_count) {
|
} else if (operands.count != result_count) {
|
||||||
error(node, "Expected %td return values, got %td", result_count, operands.count);
|
error(node, "Expected %td return values, got %td", result_count, operands.count);
|
||||||
} else {
|
} else {
|
||||||
isize max_count = rs->results.count;
|
for (isize i = 0; i < result_count; i++) {
|
||||||
for (isize i = 0; i < max_count; i++) {
|
|
||||||
Entity *e = pt->results->Tuple.variables[i];
|
Entity *e = pt->results->Tuple.variables[i];
|
||||||
check_assignment(ctx, &operands[i], e->type, str_lit("return statement"));
|
check_assignment(ctx, &operands[i], e->type, str_lit("return statement"));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user