aboutsummaryrefslogtreecommitdiff
path: root/src/check_type.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2022-02-08 17:33:55 +0000
committergingerBill <bill@gingerbill.org>2022-02-08 17:33:55 +0000
commit05dd3d490de3bf10c56e65987fbbe3024b84a4a6 (patch)
tree837c0eded8e196c7ef48bd6fc62d18d67b0d6666 /src/check_type.cpp
parent0cc40db565a9c4b99e6fa0844b9ac512558626e4 (diff)
Correct objc_class propagation for parapoly structs
Diffstat (limited to 'src/check_type.cpp')
-rw-r--r--src/check_type.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/check_type.cpp b/src/check_type.cpp
index 6d3e32466..e1a0df7e6 100644
--- a/src/check_type.cpp
+++ b/src/check_type.cpp
@@ -323,6 +323,8 @@ void add_polymorphic_record_entity(CheckerContext *ctx, Ast *node, Type *named_t
}
named_type->Named.type_name = e;
+ GB_ASSERT(original_type->kind == Type_Named);
+ e->TypeName.objc_class_name = original_type->Named.type_name->TypeName.objc_class_name;
mutex_lock(&ctx->info->gen_types_mutex);
auto *found_gen_types = map_get(&ctx->info->gen_types, original_type);