Cleanup + little polymorph + ast_copy

This commit is contained in:
Krzosa Karol
2023-03-31 08:19:26 +02:00
parent 21c8ceff03
commit aaf1b2f2d9
11 changed files with 406 additions and 15 deletions

View File

@@ -291,7 +291,9 @@ resolve_everything_in_module(Ast_Module *module) {
For_Named(file->decls, decl) {
resolve_name(file, decl->pos, decl->name);
if (decl->kind == AST_STRUCT || decl->kind == AST_UNION) {
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);
}
}