diff --git a/core_compiler.cpp b/core_compiler.cpp index 9d42cc1..f3d9463 100644 --- a/core_compiler.cpp +++ b/core_compiler.cpp @@ -289,13 +289,12 @@ resolve_everything_in_module(Ast_Module *module) { pctx->time.typechecking = os_time(); For_Named(module->all_loaded_files, file) { For_Named(file->decls, decl) { + bool is_polymorph = decl->flags & AST_POLYMORPH; + if (is_polymorph) continue; + resolve_name(file, decl->pos, decl->name); - bool is_agg = decl->kind == AST_STRUCT || decl->kind == AST_UNION; - bool is_polymorph = decl->flags & AST_POLYMORPH; - if (is_agg && !is_polymorph) { - type_complete(decl->type_val); - } + if (decl->kind == AST_STRUCT || decl->kind == AST_UNION) type_complete(decl->type_val); } } module->state = MODULE_RESOLVED;