aboutsummaryrefslogtreecommitdiff
path: root/src/check_expr.cpp
diff options
context:
space:
mode:
authorgingerBill <gingerBill@users.noreply.github.com>2025-12-15 09:43:29 +0000
committergingerBill <gingerBill@users.noreply.github.com>2025-12-15 09:43:29 +0000
commitae314a4c6bd24c450deece492de96d9cae6287f7 (patch)
treef1dc68cb90bac5c5bfc27c5400f7431fee0adcde /src/check_expr.cpp
parentdfbbe7ce7809f1f1fc5b5afe608703f2cbf4b260 (diff)
Propagate array arithmetic fix
Diffstat (limited to 'src/check_expr.cpp')
-rw-r--r--src/check_expr.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/check_expr.cpp b/src/check_expr.cpp
index 5fae9ffc2..83af90280 100644
--- a/src/check_expr.cpp
+++ b/src/check_expr.cpp
@@ -4455,7 +4455,10 @@ gb_internal void check_binary_expr(CheckerContext *c, Operand *x, Ast *node, Typ
break;
}
}
- } else if (!is_type_array_like(x->type)) {
+ } else if (is_type_array_like(x->type)) {
+ x->mode = Addressing_Value;
+ return;
+ } else {
x->value = exact_binary_operator_value(op.kind, a, b);
}