Allow scalars with matrices

This commit is contained in:
gingerBill
2021-10-21 00:04:22 +01:00
parent 3b3e7550f6
commit d67d7168e2
3 changed files with 33 additions and 9 deletions

View File

@@ -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)) {