mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 15:48:51 +00:00
Improve matrix conversion rules
This commit is contained in:
@@ -818,6 +818,10 @@ i64 check_distance_between_types(CheckerContext *c, Operand *operand, Type *type
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (is_type_matrix(dst)) {
|
if (is_type_matrix(dst)) {
|
||||||
|
if (are_types_identical(src, dst)) {
|
||||||
|
return 5;
|
||||||
|
}
|
||||||
|
|
||||||
Type *dst_elem = base_array_type(dst);
|
Type *dst_elem = base_array_type(dst);
|
||||||
i64 distance = check_distance_between_types(c, operand, dst_elem);
|
i64 distance = check_distance_between_types(c, operand, dst_elem);
|
||||||
if (distance >= 0) {
|
if (distance >= 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user