Treat Type_Tuple closer to a Type_Struct in lb_type

This commit is contained in:
gingerBill
2021-08-26 22:01:02 +01:00
parent cdd3560702
commit 726788a483

View File

@@ -1744,6 +1744,9 @@ LLVMTypeRef lb_type_internal(lbModule *m, Type *type) {
if (type->Tuple.variables.count == 1) {
return lb_type(m, type->Tuple.variables[0]->type);
} else {
m->internal_type_level += 1;
defer (m->internal_type_level -= 1);
unsigned field_count = cast(unsigned)(type->Tuple.variables.count);
LLVMTypeRef *fields = gb_alloc_array(temporary_allocator(), LLVMTypeRef, field_count);