From dc0196b01092768689e2bc943a011440ae99119a Mon Sep 17 00:00:00 2001 From: Nathaniel Saxe Date: Fri, 30 Jan 2026 00:39:02 -0500 Subject: more or less handle union types - TODO in appropriate places on why not completely handled --- src/server/completion.odin | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/server/completion.odin') diff --git a/src/server/completion.odin b/src/server/completion.odin index 31ecf0e..1fbae93 100644 --- a/src/server/completion.odin +++ b/src/server/completion.odin @@ -1974,7 +1974,8 @@ get_type_switch_completion :: proc( if union_value, ok := unwrap_union(ast_context, assign.rhs[0]); ok { for type, i in union_value.types { if symbol, ok := resolve_type_expression(ast_context, union_value.types[i]); ok { - + //TODO: using symbol.name is wrong for anonymous enums and structs, where the name field is "enum" or "struct" respectively but we want to use the full signature + //we also can't use the signature all the time because type aliases need to use specifically the alias name here and not the signature name := symbol.name if _, ok := used_unions[name]; ok { continue -- cgit v1.2.3