mirror of
https://github.com/odin-lang/Odin.git
synced 2026-10-11 15:27:06 -04:00
Allow conversions between matrices of the same element count
This commit is contained in:
1 parent
e0b9475378
commit
48d277a3c4
4 files changed
+50
-38
No files matched your search
+3
-1
@@ -2469,7 +2469,9 @@ bool check_is_castable_to(CheckerContext *c, Operand *operand, Type *y) {
|
||||
}
|
||||
|
||||
if (src->Matrix.row_count != src->Matrix.column_count) {
|
||||
return false;
|
||||
i64 src_count = src->Matrix.row_count*src->Matrix.column_count;
|
||||
i64 dst_count = dst->Matrix.row_count*dst->Matrix.column_count;
|
||||
return src_count == dst_count;
|
||||
}
|
||||
|
||||
if (dst->Matrix.row_count != dst->Matrix.column_count) {
|
||||
|
||||
Reference in new issue
Block a user