Restrict --- to variable declarations only

This commit is contained in:
gingerBill
2023-05-22 12:37:26 +01:00
parent 18c5a53685
commit d5a8f2298e
3 changed files with 27 additions and 8 deletions

View File

@@ -2176,7 +2176,7 @@ gb_internal void check_return_stmt(CheckerContext *ctx, Ast *node) {
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, false);
check_unpack_arguments(ctx, result_entities, result_count, &operands, rs->results, UnpackFlag_AllowOk);
if (result_count == 0 && rs->results.count > 0) {
error(rs->results[0], "No return values expected");