aboutsummaryrefslogtreecommitdiff
path: root/tests/hover_test.odin
diff options
context:
space:
mode:
authorBrad Lewis <22850972+BradLewis@users.noreply.github.com>2025-08-22 21:54:44 -0400
committerBrad Lewis <22850972+BradLewis@users.noreply.github.com>2025-08-22 22:29:31 -0400
commit302698f2b878cf68302fee5a46a49086e17a83cc (patch)
tree1e0702d8a52781e928aebc3947660a977c9fe26f /tests/hover_test.odin
parent52839df5fa441be5cf1cd0fb0e6b43cb5c6560c6 (diff)
Always collect private symbols and filter them when resolving
Diffstat (limited to 'tests/hover_test.odin')
-rw-r--r--tests/hover_test.odin35
1 files changed, 35 insertions, 0 deletions
diff --git a/tests/hover_test.odin b/tests/hover_test.odin
index e50c3c2..9abac4c 100644
--- a/tests/hover_test.odin
+++ b/tests/hover_test.odin
@@ -4341,6 +4341,41 @@ ast_hover_soa_pointer_field_variable :: proc(t: ^testing.T) {
}
test.expect_hover(t, &source, "test.a: int")
}
+
+@(test)
+ast_hover_overload_private_procs :: proc(t: ^testing.T) {
+ packages := make([dynamic]test.Package, context.temp_allocator)
+
+ append(
+ &packages,
+ test.Package {
+ pkg = "my_package",
+ source = `package my_package
+
+ @(private = "file")
+ foo_str :: proc(s: string) {}
+ @(private = "file")
+ foo_int :: proc(i: int) {}
+ foo :: proc {
+ foo_str,
+ foo_int,
+ }
+ `,
+ },
+ )
+ source := test.Source {
+ main = `package test
+ import "my_package"
+
+ main :: proc() {
+ s: string
+ foo := my_package.fo{*}o(s)
+ }
+ `,
+ packages = packages[:],
+ }
+ test.expect_hover(t, &source, "@(private=\"file\")\nmy_package.foo: proc(s: string)")
+}
/*
Waiting for odin fix