From 352221c8688e47364b0fa6c4e436f3e0a2dfc131 Mon Sep 17 00:00:00 2001 From: Daniel Gavin Date: Tue, 28 Jun 2022 22:43:40 +0200 Subject: odinfmt: fix proc tags being printed --- src/server/analysis.odin | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/server/analysis.odin') diff --git a/src/server/analysis.odin b/src/server/analysis.odin index 5c40e7e..c22c1e8 100644 --- a/src/server/analysis.odin +++ b/src/server/analysis.odin @@ -1785,8 +1785,18 @@ make_symbol_union_from_ast :: proc(ast_context: ^AstContext, v: ast.Union_Type, symbol.name = "union" } + types := make([dynamic]^ast.Expr, ast_context.allocator) + + for variant in v.variants { + if v.poly_params != nil { + append(&types, clone_type(variant, ast_context.allocator, nil)) + } else { + append(&types, variant) + } + } + symbol.value = SymbolUnionValue { - types = v.variants, + types = types[:], } if v.poly_params != nil { -- cgit v1.2.3