From 135e03599cc33831de46181aef69ffce24976f3d Mon Sep 17 00:00:00 2001 From: Brad Lewis <22850972+BradLewis@users.noreply.github.com> Date: Fri, 13 Jun 2025 08:50:59 -0400 Subject: Correctly handle array types of pointers --- src/server/analysis.odin | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/server/analysis.odin b/src/server/analysis.odin index 5cd290d..08965fb 100644 --- a/src/server/analysis.odin +++ b/src/server/analysis.odin @@ -824,6 +824,8 @@ resolve_location_type_expression :: proc(ast_context: ^AstContext, node: ^ast.Ex return {}, true case ^ast.Array_Type: return resolve_location_type_expression(ast_context, n.elem) + case ^ast.Dynamic_Array_Type: + return resolve_location_type_expression(ast_context, n.elem) case ^ast.Pointer_Type: return resolve_location_type_expression(ast_context, n.elem) case ^ast.Comp_Lit: @@ -2035,9 +2037,9 @@ resolve_location_type_identifier :: proc(ast_context: ^AstContext, node: ast.Ide case ^ast.Basic_Lit: return {}, true case ^ast.Array_Type: - if elem, ok := n.elem.derived.(^ast.Ident); ok { - return resolve_location_identifier(ast_context, elem^) - } + return resolve_location_type_expression(ast_context, n.elem) + case ^ast.Dynamic_Array_Type: + return resolve_location_type_expression(ast_context, n.elem) case ^ast.Selector_Expr: return resolve_selector_expression(ast_context, n) case ^ast.Pointer_Type: -- cgit v1.2.3