Skip resolution of polymorphs

This commit is contained in:
Krzosa Karol
2023-04-01 12:22:45 +02:00
parent 7674984f4a
commit 2c19658115

View File

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