Fix full length swizzles through a pointer keeping the pointer type

This commit is contained in:
Louis Novy committed 2026-09-26 22:22:42 -04:00
1 parent a6650ce787
commit d65d743ab7
4 files changed
+20 -2

No files matched your search

+2 -2
View File
@@ -5830,7 +5830,7 @@ gb_internal Type *determine_swizzle_array_type(Type *original_type, Type *type_h
Type *elem_type = array_type->Array.elem;
Type *swizzle_array_type = nullptr;
Type *bth = base_type(type_deref(type_hint));
Type *bth = base_type(type_hint);
if (bth != nullptr && bth->kind == Type_Array &&
bth->Array.count == new_count &&
are_types_identical(bth->Array.elem, elem_type)) {
@@ -5838,7 +5838,7 @@ gb_internal Type *determine_swizzle_array_type(Type *original_type, Type *type_h
} else {
i64 max_count = array_type->Array.count;
if (new_count == max_count) {
swizzle_array_type = original_type;
swizzle_array_type = type_deref(original_type);
} else {
swizzle_array_type = alloc_type_array(elem_type, new_count);
}