aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBrad Lewis <22850972+BradLewis@users.noreply.github.com>2025-07-25 15:38:48 -0400
committerBrad Lewis <22850972+BradLewis@users.noreply.github.com>2025-07-25 15:38:48 -0400
commit337ddab8eeb831dc4058a06b9ba83ebec0a40ddf (patch)
tree8bf3372ca2d4a7e45766fa8d7da46a53e0496a7b /src
parent3d51d3ab487d363d39f5c9e2218ebf0163029bb1 (diff)
Correctly infer return type enum fields for completions
Diffstat (limited to 'src')
-rw-r--r--src/server/completion.odin4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/server/completion.odin b/src/server/completion.odin
index 01a7d32..e04963f 100644
--- a/src/server/completion.odin
+++ b/src/server/completion.odin
@@ -938,7 +938,7 @@ get_implicit_completion :: proc(
//infer bitset and enums based on the identifier comp_lit, i.e. a := My_Struct { my_ident = . }
if position_context.comp_lit != nil {
- if position_context.parent_comp_lit.type != nil {
+ if position_context.parent_comp_lit != nil {
field_name: string
if position_context.field_value != nil {
@@ -949,7 +949,7 @@ get_implicit_completion :: proc(
}
}
- if symbol, ok := resolve_type_expression(ast_context, position_context.parent_comp_lit.type); ok {
+ if symbol, ok := resolve_comp_literal(ast_context, position_context); ok {
if comp_symbol, comp_lit, ok := resolve_type_comp_literal(
ast_context,
position_context,