From 7674984f4ad4e50f947eaa74623e1b0ba3d60ed9 Mon Sep 17 00:00:00 2001 From: Krzosa Karol Date: Sat, 1 Apr 2023 12:20:44 +0200 Subject: [PATCH] Propagate polymorph to declaration --- core_parsing.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core_parsing.cpp b/core_parsing.cpp index b44a725..0436fe8 100644 --- a/core_parsing.cpp +++ b/core_parsing.cpp @@ -927,6 +927,8 @@ 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)) + set_flag(result->flags, AST_POLYMORPH); if (is_flag_set(flags, AST_FOREIGN)) set_flag(expr->flags, flags); }