diff options
| author | Brad Lewis <22850972+BradLewis@users.noreply.github.com> | 2025-06-13 08:50:59 -0400 |
|---|---|---|
| committer | Brad Lewis <22850972+BradLewis@users.noreply.github.com> | 2025-06-13 15:23:36 -0400 |
| commit | 135e03599cc33831de46181aef69ffce24976f3d (patch) | |
| tree | 3e4c900b5f7560b6a9c7aaf709e7d3786da795e6 /src | |
| parent | 20b4d31f49be2f74a3a34d3177f018d358ef2cf8 (diff) | |
Correctly handle array types of pointers
Diffstat (limited to 'src')
| -rw-r--r-- | src/server/analysis.odin | 8 |
1 files changed, 5 insertions, 3 deletions
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: |