diff options
| author | Bradley Lewis <22850972+BradLewis@users.noreply.github.com> | 2025-09-24 14:59:55 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-09-24 14:59:55 -0400 |
| commit | 495012ffe93385f399d3947952466448c692f0d4 (patch) | |
| tree | ad03d0fca253f2348e5e25d869eb9a7578084ca8 /tests/hover_test.odin | |
| parent | e50bcf94367f594e76628cae8751b6f00911a4b8 (diff) | |
| parent | 50273daf85ec00f429dd61b1f9f196fb5fdc5bb2 (diff) | |
Merge pull request #1054 from BradLewis/fix/package-naming-conflicts
Correct resolving package instead of field when name collides
Diffstat (limited to 'tests/hover_test.odin')
| -rw-r--r-- | tests/hover_test.odin | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/tests/hover_test.odin b/tests/hover_test.odin index b2af26a..345e9f9 100644 --- a/tests/hover_test.odin +++ b/tests/hover_test.odin @@ -5049,6 +5049,43 @@ ast_hover_proc_overload_nil_pointer :: proc(t: ^testing.T) { } test.expect_hover(t, &source, "test.foo :: proc(s: ^string)") } + +@(test) +ast_hover_package_proc_naming_conflicting_with_another_package :: proc(t: ^testing.T) { + packages := make([dynamic]test.Package, context.temp_allocator) + + append( + &packages, + test.Package { + pkg = "my_package", + source = `package my_package + foo :: proc() {} + `, + }, + ) + append( + &packages, + test.Package { + pkg = "foo", + source = `package foo + `, + }, + ) + + source := test.Source { + main = `package test + import "my_package" + import "foo" + + main :: proc() { + f := my_package.fo{*}o + } + `, + packages = packages[:], + } + + test.expect_hover(t, &source, "my_package.foo :: proc()") +} /* Waiting for odin fix |