Polymorphs nested structs

This commit is contained in:
Krzosa Karol
2023-04-01 14:31:41 +02:00
parent 2c19658115
commit 3d438645a0
7 changed files with 48 additions and 23 deletions

View File

@@ -927,8 +927,10 @@ parse_decl(B32 is_global) {
auto a = (Ast_Lambda *)expr;
if (a->scope || is_flag_set(flags, AST_FOREIGN)) {
result->kind = AST_LAMBDA;
if (is_flag_set(a->flags, AST_POLYMORPH))
if (is_flag_set(a->flags, AST_POLYMORPH)) {
set_flag(result->flags, AST_POLYMORPH);
set_flag(result->flags, AST_PARENT_POLYMORPH);
}
if (is_flag_set(flags, AST_FOREIGN))
set_flag(expr->flags, flags);
}