aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBrad Lewis <22850972+BradLewis@users.noreply.github.com>2025-07-31 20:19:26 -0400
committerBrad Lewis <22850972+BradLewis@users.noreply.github.com>2025-07-31 20:19:26 -0400
commitd6bfdd611ccf122117ef25e40b0f104b3f923de4 (patch)
treea2552fe11ee7e0716323836cc1253aa95817bd47 /src
parent56447447ddb370ea74d66cf27ea5395b432a7700 (diff)
Resolve objc methods before expanding usings to fix issues with hover documentation
Diffstat (limited to 'src')
-rw-r--r--src/server/analysis.odin2
-rw-r--r--src/server/documentation.odin2
-rw-r--r--src/server/symbol.odin2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/server/analysis.odin b/src/server/analysis.odin
index f02448a..b88368d 100644
--- a/src/server/analysis.odin
+++ b/src/server/analysis.odin
@@ -2344,8 +2344,8 @@ resolve_symbol_return :: proc(ast_context: ^AstContext, symbol: Symbol, ok := tr
}
//expand the types and names from the using - can't be done while indexing without complicating everything(this also saves memory)
- expand_usings(ast_context, &b)
expand_objc(ast_context, &b)
+ expand_usings(ast_context, &b)
return to_symbol(b), ok
case SymbolGenericValue:
ret, ok := resolve_type_expression(ast_context, v.expr)
diff --git a/src/server/documentation.odin b/src/server/documentation.odin
index 4e1cf9f..e70aea2 100644
--- a/src/server/documentation.odin
+++ b/src/server/documentation.odin
@@ -549,7 +549,7 @@ write_struct_hover :: proc(ast_context: ^AstContext, sb: ^strings.Builder, v: Sy
for i in 0 ..< len(v.names) {
if i < len(v.from_usings) {
- if index := v.from_usings[i]; index != using_index {
+ if index := v.from_usings[i]; index != using_index && index != -1 {
fmt.sbprintf(sb, "\n\t// from `using %s: ", v.names[index])
build_string_node(v.types[index], sb, false)
if backing_type, ok := v.backing_types[index]; ok {
diff --git a/src/server/symbol.odin b/src/server/symbol.odin
index d933819..ad16339 100644
--- a/src/server/symbol.odin
+++ b/src/server/symbol.odin
@@ -361,8 +361,8 @@ write_struct_type :: proc(
resolve_poly_struct(ast_context, b, v.poly_params)
}
- expand_usings(ast_context, b)
expand_objc(ast_context, b)
+ expand_usings(ast_context, b)
}
write_symbol_struct_value :: proc(