aboutsummaryrefslogtreecommitdiff
path: root/tests/hover_test.odin
diff options
context:
space:
mode:
Diffstat (limited to 'tests/hover_test.odin')
-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