mirror of
https://github.com/odin-lang/Odin.git
synced 2026-08-14 01:34:35 +00:00
Merge pull request #7313 from kalsprite/matrix_type_hint
check_matrix_type_hint: require the element type and layout to match
This commit is contained in:
@@ -4215,8 +4215,9 @@ gb_internal Type *check_matrix_type_hint(Type *matrix, Type *type_hint) {
|
||||
} else if (xt->kind == Type_Matrix && th->kind == Type_Matrix) {
|
||||
if (!are_types_identical(xt->Matrix.elem, th->Matrix.elem)) {
|
||||
// ignore
|
||||
} if (xt->Matrix.row_count == th->Matrix.row_count &&
|
||||
xt->Matrix.column_count == th->Matrix.column_count) {
|
||||
} else if (xt->Matrix.row_count == th->Matrix.row_count &&
|
||||
xt->Matrix.column_count == th->Matrix.column_count &&
|
||||
xt->Matrix.is_row_major == th->Matrix.is_row_major) {
|
||||
return type_hint;
|
||||
}
|
||||
} else if (xt->kind == Type_Matrix && th->kind == Type_Array) {
|
||||
|
||||
Reference in New Issue
Block a user