aboutsummaryrefslogtreecommitdiff
path: root/src/check_expr.cpp
diff options
context:
space:
mode:
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);
}