From a18728ada67d36958de97319b85defd940f3c2cd Mon Sep 17 00:00:00 2001 From: DanielGavin Date: Sat, 5 Oct 2024 22:06:28 +0200 Subject: [PATCH] Remember to set the call expression in ast_context when entering them in file resolve. --- src/server/file_resolve.odin | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/server/file_resolve.odin b/src/server/file_resolve.odin index 24a8f8c..a8fa894 100644 --- a/src/server/file_resolve.odin +++ b/src/server/file_resolve.odin @@ -320,7 +320,16 @@ resolve_node :: proc(node: ^ast.Node, data: ^FileResolveData) { case ^Paren_Expr: resolve_node(n.expr, data) case ^Call_Expr: + old_call := data.ast_context.call + data.position_context.call = n + data.ast_context.call = n + + defer { + data.position_context.call = old_call + data.ast_context.call = old_call + } + resolve_node(n.expr, data) for arg in n.args {