diff options
Diffstat (limited to 'src/server/analysis.odin')
| -rw-r--r-- | src/server/analysis.odin | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/server/analysis.odin b/src/server/analysis.odin index db37ef7..7798be9 100644 --- a/src/server/analysis.odin +++ b/src/server/analysis.odin @@ -1405,7 +1405,8 @@ resolve_selector_expression :: proc(ast_context: ^AstContext, node: ^ast.Selecto set_ast_package_from_symbol_scoped(ast_context, selector) ok := internal_resolve_type_expression(ast_context, s.expr, &symbol) - symbol.type = .Variable + symbol.type = .Field + symbol.flags |= {.Mutable} return symbol, ok } else { value := SymbolFixedArrayValue { @@ -2457,6 +2458,12 @@ resolve_symbol_return :: proc(ast_context: ^AstContext, symbol: Symbol, ok := tr if symbol.type == .Variable { ret.type = symbol.type } + if .Variable in symbol.flags { + ret.flags |= {.Variable} + } + if .Mutable in symbol.flags { + ret.flags |= {.Mutable} + } return ret, ok } @@ -2489,6 +2496,7 @@ resolve_unresolved_symbol :: proc(ast_context: ^AstContext, symbol: ^Symbol) -> symbol.signature = ret.signature symbol.value = ret.value symbol.pkg = ret.pkg + symbol.flags |= ret.flags } else { return false } |