diff options
| author | Brad Lewis <22850972+BradLewis@users.noreply.github.com> | 2025-10-06 00:23:55 -0400 |
|---|---|---|
| committer | Brad Lewis <22850972+BradLewis@users.noreply.github.com> | 2025-10-06 00:23:55 -0400 |
| commit | e64b11784cd430d27eb469039002c7e2c950b2fd (patch) | |
| tree | 7e1d35bfa45ab5be3ba445443157768b8bfeb719 /tests/hover_test.odin | |
| parent | 359c6ebffa2b9781bc772297182025d00ea4af29 (diff) | |
Resolve types from usings before global scope
Diffstat (limited to 'tests/hover_test.odin')
| -rw-r--r-- | tests/hover_test.odin | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/hover_test.odin b/tests/hover_test.odin index 796787c..341b641 100644 --- a/tests/hover_test.odin +++ b/tests/hover_test.odin @@ -5151,6 +5151,34 @@ ast_hover_generic_proc_with_inlining :: proc(t: ^testing.T) { } test.expect_hover(t, &source, "test.foo :: #force_inline proc(data: $T)") } + +@(test) +ast_hover_using_import_statement_name_conflict :: proc(t: ^testing.T) { + packages := make([dynamic]test.Package, context.temp_allocator) + + append(&packages, test.Package{pkg = "my_package", source = `package my_package + Bar :: struct { + b: string, + } + `}) + + source := test.Source { + main = `package test + import "my_package" + + Bar :: struct { + a: int, + } + + main :: proc() { + using my_package + bar := Ba{*}r{} + } + `, + packages = packages[:], + } + test.expect_hover(t, &source, "my_package.Bar :: struct {\n\tb: string,\n}") +} /* Waiting for odin fix |