diff options
| author | Brad Lewis <22850972+BradLewis@users.noreply.github.com> | 2025-09-24 14:52:15 -0400 |
|---|---|---|
| committer | Brad Lewis <22850972+BradLewis@users.noreply.github.com> | 2025-09-24 14:52:15 -0400 |
| commit | 50273daf85ec00f429dd61b1f9f196fb5fdc5bb2 (patch) | |
| tree | ad03d0fca253f2348e5e25d869eb9a7578084ca8 /src/server/hover.odin | |
| parent | e50bcf94367f594e76628cae8751b6f00911a4b8 (diff) | |
Correct resolving package instead of field when name collides
Diffstat (limited to 'src/server/hover.odin')
| -rw-r--r-- | src/server/hover.odin | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/server/hover.odin b/src/server/hover.odin index fe69949..e3f641d 100644 --- a/src/server/hover.odin +++ b/src/server/hover.odin @@ -290,6 +290,7 @@ get_hover_information :: proc(document: ^Document, position: common.Position) -> ast_context.current_package = selector.pkg + // TODO: Use resolve_selector_expression for this? #partial switch v in selector.value { case SymbolStructValue: for name, i in v.names { @@ -323,7 +324,8 @@ get_hover_information :: proc(document: ^Document, position: common.Position) -> } } } - if resolved, ok := resolve_type_identifier(&ast_context, ident^); ok { + + if resolved, ok := resolve_symbol_return(&ast_context, lookup(ident.name, selector.pkg, ast_context.fullpath)); ok { build_documentation(&ast_context, &resolved, false) resolved.name = ident.name |