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

@@ -123,7 +123,7 @@ gb_internal void check_init_variables(CheckerContext *ctx, Entity **lhs, isize l
// an extra allocation
TEMPORARY_ALLOCATOR_GUARD();
auto operands = array_make<Operand>(temporary_allocator(), 0, 2*lhs_count);
check_unpack_arguments(ctx, lhs, lhs_count, &operands, inits, true, false);
check_unpack_arguments(ctx, lhs, lhs_count, &operands, inits, UnpackFlag_AllowOk|UnpackFlag_AllowUndef);
isize rhs_count = operands.count;
isize max = gb_min(lhs_count, rhs_count);