Merge pull request #7629 from Dreamshade-1911/fix/proc-lit-union-variant-compound-lit

Fix #7596 and #7511
This commit is contained in:
gingerBill authored and GitHub committed 2026-09-27 15:01:39 +01:00
commit 9924dcebd3
4 files changed
+29 -1

No files matched your search

+3 -1
View File
@@ -9532,7 +9532,9 @@ gb_internal bool check_is_operand_compound_lit_constant(CheckerContext *c, Opera
return true;
}
if (expr->kind == Ast_ProcLit) {
add_type_and_value(c, expr, Addressing_Constant, type_of_expr(expr), exact_value_procedure(expr));
ExactValue value = exact_value_procedure(expr);
value.variant_type = o->value.variant_type;
add_type_and_value(c, expr, Addressing_Constant, type_of_expr(expr), value);
return true;
}