summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBrad Lewis <22850972+BradLewis@users.noreply.github.com>2025-10-06 00:23:55 -0400
committerBrad Lewis <22850972+BradLewis@users.noreply.github.com>2025-10-06 00:23:55 -0400
commite64b11784cd430d27eb469039002c7e2c950b2fd (patch)
tree7e1d35bfa45ab5be3ba445443157768b8bfeb719 /tests
parent359c6ebffa2b9781bc772297182025d00ea4af29 (diff)
Resolve types from usings before global scope
Diffstat (limited to 'tests')
-rw-r--r--tests/hover_test.odin28
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