diff options
| author | Bradley Lewis <22850972+BradLewis@users.noreply.github.com> | 2025-11-13 15:52:27 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-11-13 15:52:27 -0500 |
| commit | 2b776a5d94b5c11fd2998e07a3d294f506ad094d (patch) | |
| tree | 65df34c4ec7d2bb1d70c6b794cb7c1460190a549 /src | |
| parent | 588eef64d261dbc375eec05bfc2a011b92ceb5c5 (diff) | |
| parent | dd4ff896dbd188762bcadede367552544d08a860 (diff) | |
Merge pull request #1179 from BradLewis/fix/struct-using-with-parens
Correctly resolve struct usings that are paren exprs
Diffstat (limited to 'src')
| -rw-r--r-- | src/server/symbol.odin | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/server/symbol.odin b/src/server/symbol.odin index b6239da..2869e5c 100644 --- a/src/server/symbol.odin +++ b/src/server/symbol.odin @@ -543,7 +543,11 @@ expand_usings :: proc(ast_context: ^AstContext, b: ^SymbolStructValueBuilder) { append(&b.usings, u) derived := field_expr.derived - if ptr, ok := field_expr.derived.(^ast.Pointer_Type); ok { + if param, ok := derived.(^ast.Paren_Expr); ok { + derived = param.expr.derived + } + + if ptr, ok := derived.(^ast.Pointer_Type); ok { (ptr.elem != nil) or_continue derived = ptr.elem.derived } |