diff options
| author | Brad Lewis <22850972+BradLewis@users.noreply.github.com> | 2025-08-22 21:54:44 -0400 |
|---|---|---|
| committer | Brad Lewis <22850972+BradLewis@users.noreply.github.com> | 2025-08-22 22:29:31 -0400 |
| commit | 302698f2b878cf68302fee5a46a49086e17a83cc (patch) | |
| tree | 1e0702d8a52781e928aebc3947660a977c9fe26f /tests/hover_test.odin | |
| parent | 52839df5fa441be5cf1cd0fb0e6b43cb5c6560c6 (diff) | |
Always collect private symbols and filter them when resolving
Diffstat (limited to 'tests/hover_test.odin')
| -rw-r--r-- | tests/hover_test.odin | 35 |
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 |