aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBradley Lewis <22850972+BradLewis@users.noreply.github.com>2025-09-24 14:59:55 -0400
committerGitHub <noreply@github.com>2025-09-24 14:59:55 -0400
commit495012ffe93385f399d3947952466448c692f0d4 (patch)
treead03d0fca253f2348e5e25d869eb9a7578084ca8 /src
parente50bcf94367f594e76628cae8751b6f00911a4b8 (diff)
parent50273daf85ec00f429dd61b1f9f196fb5fdc5bb2 (diff)
Merge pull request #1054 from BradLewis/fix/package-naming-conflicts
Correct resolving package instead of field when name collides
Diffstat (limited to 'src')
-rw-r--r--src/server/hover.odin4
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