aboutsummaryrefslogtreecommitdiff
path: root/src/check_expr.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2024-05-20 15:00:43 +0100
committergingerBill <bill@gingerbill.org>2024-05-20 15:00:43 +0100
commita68c635c0001f4556d468ae6773bd61703c8f560 (patch)
tree7882ccc3bbf00e536a0a6bffcf564f579cb7fdda /src/check_expr.cpp
parentf600562ca505a3940e99f02a63b361b708f6c16f (diff)
Remove constant indexing for `matrix` value propagation
Diffstat (limited to 'src/check_expr.cpp')
-rw-r--r--src/check_expr.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/check_expr.cpp b/src/check_expr.cpp
index c9cfb58be..32c55228b 100644
--- a/src/check_expr.cpp
+++ b/src/check_expr.cpp
@@ -10157,7 +10157,7 @@ gb_internal ExprKind check_index_expr(CheckerContext *c, Operand *o, Ast *node,
o->mode = Addressing_Invalid;
o->expr = node;
return kind;
- } else if (ok) {
+ } else if (ok && !is_type_matrix(t)) {
ExactValue value = type_and_value_of_expr(ie->expr).value;
o->mode = Addressing_Constant;
bool success = false;