From e0ff16f98cf6c61115db50bb607479e6f8b0b98b Mon Sep 17 00:00:00 2001 From: Jeroen van Rijn Date: Sat, 24 Jan 2026 10:53:38 +0100 Subject: Fix #6126 `ExactValue_Compound` wasn't handled properly. --- src/exact_value.cpp | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'src/exact_value.cpp') diff --git a/src/exact_value.cpp b/src/exact_value.cpp index f266b8b24..0f425e043 100644 --- a/src/exact_value.cpp +++ b/src/exact_value.cpp @@ -947,7 +947,7 @@ gb_internal gb_inline i32 cmp_f64(f64 a, f64 b) { return (a > b) - (a < b); } -gb_internal bool compare_exact_values_compound_lit(TokenKind op, ExactValue x, ExactValue y, bool *do_break_); +gb_internal bool compare_exact_values_compound_lit(TokenKind op, ExactValue x, ExactValue y); gb_internal bool compare_exact_values(TokenKind op, ExactValue x, ExactValue y) { match_exact_values(&x, &y); @@ -1060,18 +1060,13 @@ gb_internal bool compare_exact_values(TokenKind op, ExactValue x, ExactValue y) case ExactValue_Compound: if (op != Token_CmpEq && op != Token_NotEq) { - break; + return false; } if (x.kind != y.kind) { - break; + return false; } - bool do_break = false; - bool res = compare_exact_values_compound_lit(op, x, y, &do_break); - if (do_break) { - break; - } - return res; + return compare_exact_values_compound_lit(op, x, y); } GB_PANIC("Invalid comparison: %d", x.kind); -- cgit v1.2.3