diff options
| author | Nathaniel Saxe <NathanielSaxophone@gmail.com> | 2026-01-30 00:39:02 -0500 |
|---|---|---|
| committer | Nathaniel Saxe <NathanielSaxophone@gmail.com> | 2026-01-30 00:39:02 -0500 |
| commit | dc0196b01092768689e2bc943a011440ae99119a (patch) | |
| tree | 0c53214e0319b0f08a7d9344937aaf1de22f1879 /src/server/completion.odin | |
| parent | eea11e9d1e3035b89351cd888b35b920a40de81b (diff) | |
more or less handle union types - TODO in appropriate places on why not completely handled
Diffstat (limited to 'src/server/completion.odin')
| -rw-r--r-- | src/server/completion.odin | 3 |
1 files changed, 2 insertions, 1 deletions
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 |