mirror of
https://github.com/odin-lang/Odin.git
synced 2026-01-01 19:02:13 +00:00
Improve #simd literal support
This commit is contained in:
@@ -777,6 +777,14 @@ i64 check_distance_between_types(CheckerContext *c, Operand *operand, Type *type
|
||||
return distance + 6;
|
||||
}
|
||||
}
|
||||
|
||||
if (is_type_simd_vector(dst)) {
|
||||
Type *dst_elem = base_array_type(dst);
|
||||
i64 distance = check_distance_between_types(c, operand, dst_elem);
|
||||
if (distance >= 0) {
|
||||
return distance + 6;
|
||||
}
|
||||
}
|
||||
|
||||
if (is_type_matrix(dst)) {
|
||||
Type *dst_elem = base_array_type(dst);
|
||||
@@ -786,6 +794,7 @@ i64 check_distance_between_types(CheckerContext *c, Operand *operand, Type *type
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (is_type_any(dst)) {
|
||||
if (!is_type_polymorphic(src)) {
|
||||
if (operand->mode == Addressing_Context && operand->type == t_context) {
|
||||
|
||||
Reference in New Issue
Block a user