diff options
| author | Brad Lewis <22850972+BradLewis@users.noreply.github.com> | 2025-09-08 08:55:08 -0400 |
|---|---|---|
| committer | Brad Lewis <22850972+BradLewis@users.noreply.github.com> | 2025-09-08 08:55:08 -0400 |
| commit | 38f27472e9baf7b856dc1ff61c50b19e9b07816c (patch) | |
| tree | be932e3756b04e6495e8426af2c771282e110984 /src | |
| parent | 9a4c5579846a41f2c42ee8e937a8f88a50eec0af (diff) | |
Mark struct and bitset fields correctly
Diffstat (limited to 'src')
| -rw-r--r-- | src/server/analysis.odin | 6 | ||||
| -rw-r--r-- | src/server/completion.odin | 1 |
2 files changed, 5 insertions, 2 deletions
diff --git a/src/server/analysis.odin b/src/server/analysis.odin index 889bdc4..3b63d7c 100644 --- a/src/server/analysis.odin +++ b/src/server/analysis.odin @@ -1387,7 +1387,8 @@ resolve_selector_expression :: proc(ast_context: ^AstContext, node: ^ast.Selecto set_ast_package_from_node_scoped(ast_context, s.types[i]) ast_context.field_name = node.field^ ok := internal_resolve_type_expression(ast_context, s.types[i], &symbol) - symbol.type = .Variable + symbol.type = .Field + symbol.flags |= {.Mutable} return symbol, ok } } @@ -1396,7 +1397,8 @@ resolve_selector_expression :: proc(ast_context: ^AstContext, node: ^ast.Selecto if node.field != nil && name == node.field.name { ast_context.field_name = node.field^ ok := internal_resolve_type_expression(ast_context, s.types[i], &symbol) - symbol.type = .Variable + symbol.type = .Field + symbol.flags |= {.Mutable} return symbol, ok } } diff --git a/src/server/completion.odin b/src/server/completion.odin index 802445f..ced08b4 100644 --- a/src/server/completion.odin +++ b/src/server/completion.odin @@ -747,6 +747,7 @@ get_selector_completion :: proc( } if selector.type != .Variable && + selector.type != .Field && selector.type != .Package && selector.type != .Enum && selector.type != .Function { |