diff options
| author | Laytan Laats <laytanlaats@hotmail.com> | 2024-08-10 21:03:40 +0200 |
|---|---|---|
| committer | Laytan Laats <laytanlaats@hotmail.com> | 2024-08-10 21:03:40 +0200 |
| commit | 6918d8aaa6e13fb7529884a436aa20a87e6b6f10 (patch) | |
| tree | 8949c6bbbb7b0584078acc79a707b8c54f6f4c22 /src/checker.cpp | |
| parent | e226d3780399aeaf8c9f41b9e7f021d849948104 (diff) | |
possibly fix init_core_type_info race condition
Diffstat (limited to 'src/checker.cpp')
| -rw-r--r-- | src/checker.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/checker.cpp b/src/checker.cpp index 60000ec29..ddbe6e007 100644 --- a/src/checker.cpp +++ b/src/checker.cpp @@ -2991,6 +2991,9 @@ gb_internal void init_core_type_info(Checker *c) { } Entity *type_info_entity = find_core_entity(c, str_lit("Type_Info")); GB_ASSERT(type_info_entity != nullptr); + if (type_info_entity->type == nullptr) { + check_single_global_entity(c, type_info_entity, type_info_entity->decl_info); + } GB_ASSERT(type_info_entity->type != nullptr); t_type_info = type_info_entity->type; |