mirror of
https://github.com/odin-lang/Odin.git
synced 2026-01-03 11:42:28 +00:00
Allow scalars with matrices
This commit is contained in:
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user