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.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/check_expr.cpp b/src/check_expr.cpp
index 8a1e5fd86..498bf78c7 100644
--- a/src/check_expr.cpp
+++ b/src/check_expr.cpp
@@ -657,6 +657,14 @@ i64 check_distance_between_types(CheckerContext *c, Operand *operand, Type *type
return distance + 6;
}
}
+
+ if (is_type_matrix(dst)) {
+ Type *elem = base_array_type(dst);
+ i64 distance = check_distance_between_types(c, operand, elem);
+ if (distance >= 0) {
+ return distance + 7;
+ }
+ }
if (is_type_any(dst)) {
if (!is_type_polymorphic(src)) {