diff options
| author | DanielGavin <danielgavin5@hotmail.com> | 2024-02-01 00:56:57 +0100 |
|---|---|---|
| committer | DanielGavin <danielgavin5@hotmail.com> | 2024-02-01 00:56:57 +0100 |
| commit | d3fd20e81162cbf3c41b4a7299d36ab56f72fae7 (patch) | |
| tree | 1802a47268f6c8a21ee37b7f91aa5bcc3afadb8f /src | |
| parent | c320e844daacd056a301c508e299e1b4a41b6902 (diff) | |
Forgot to set ast_context.call.
Diffstat (limited to 'src')
| -rw-r--r-- | src/server/analysis.odin | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/server/analysis.odin b/src/server/analysis.odin index c89ac2f..89de046 100644 --- a/src/server/analysis.odin +++ b/src/server/analysis.odin @@ -87,7 +87,7 @@ AstContext :: struct { document_package: string, use_locals: bool, local_id: int, - call: ^ast.Call_Expr, //used to determene the types for generics and the correct function for overloaded functions + call: ^ast.Call_Expr, //used to determine the types for generics and the correct function for overloaded functions value_decl: ^ast.Value_Decl, field_name: ast.Ident, uri: string, @@ -1393,6 +1393,13 @@ internal_resolve_type_identifier :: proc( v^, ) case ^ast.Call_Expr: + old_call := ast_context.call + ast_context.call = cast(^Call_Expr)global.expr + + defer { + ast_context.call = old_call + } + call_symbol := internal_resolve_type_expression( ast_context, v.expr, @@ -1520,7 +1527,10 @@ internal_resolve_type_identifier :: proc( return symbol, true } - is_runtime := strings.contains(ast_context.current_package, "core/runtime") + is_runtime := strings.contains( + ast_context.current_package, + "core/runtime", + ) if is_runtime { if symbol, ok := lookup(node.name, "$builtin"); ok { |