aboutsummaryrefslogtreecommitdiff
path: root/src/exact_value.cpp
diff options
context:
space:
mode:
authorJeroen van Rijn <Kelimion@users.noreply.github.com>2026-01-24 11:02:01 +0100
committerGitHub <noreply@github.com>2026-01-24 11:02:01 +0100
commit8e390921c3e470e43d3e4aee64a46c1ad867e192 (patch)
tree1eebce93a8f62028e9607dee9137e7aa09ccc424 /src/exact_value.cpp
parent7e39669fd1f4bc67a801d0dc5ba6eadffc7de3e5 (diff)
parente0ff16f98cf6c61115db50bb607479e6f8b0b98b (diff)
Merge pull request #6162 from Kelimion/fix-6126
Fix #6126
Diffstat (limited to 'src/exact_value.cpp')
-rw-r--r--src/exact_value.cpp13
1 files changed, 4 insertions, 9 deletions
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);