aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBrad Lewis <22850972+BradLewis@users.noreply.github.com>2025-09-22 21:09:41 -0400
committerBrad Lewis <22850972+BradLewis@users.noreply.github.com>2025-09-22 21:09:41 -0400
commitcceb115d109c6fc86d8f6aa9cbe19517437e1519 (patch)
tree8e0323408760a9896f2697ec44468eb4e724b625 /tests
parentd4e3c3a58d3ae0c5d42ef76b3de037fc5b720f77 (diff)
Correct resolving basic type aliases of keywords by using the underlying ident name rather than the symbol name
Diffstat (limited to 'tests')
-rw-r--r--tests/hover_test.odin29
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/hover_test.odin b/tests/hover_test.odin
index 3063d13..9d65d8c 100644
--- a/tests/hover_test.odin
+++ b/tests/hover_test.odin
@@ -4999,6 +4999,35 @@ ast_hover_proc_overload_generic_map :: proc(t: ^testing.T) {
}
test.expect_hover(t, &source, "test.clear :: proc(m: ^$T/map[$K]$V)")
}
+
+@(test)
+ast_hover_proc_overload_basic_type_alias :: proc(t: ^testing.T) {
+ packages := make([dynamic]test.Package, context.temp_allocator)
+
+ append(&packages, test.Package{pkg = "my_package", source = `package my_package
+ Bar :: int
+ `})
+
+ source := test.Source {
+ main = `package test
+ import "my_package"
+
+ foo_int :: proc(i: int) {}
+ foo_string :: proc(s: string) {}
+ foo :: proc {
+ foo_int,
+ foo_string,
+ }
+
+ main :: proc() {
+ bar: my_package.Bar
+ f{*}oo(bar)
+ }
+ `,
+ packages = packages[:],
+ }
+ test.expect_hover(t, &source, "test.foo :: proc(i: int)")
+}
/*
Waiting for odin fix