aboutsummaryrefslogtreecommitdiff
path: root/tests/hover_test.odin
diff options
context:
space:
mode:
authorBrad Lewis <22850972+BradLewis@users.noreply.github.com>2025-08-31 09:33:02 -0400
committerBrad Lewis <22850972+BradLewis@users.noreply.github.com>2025-08-31 09:33:02 -0400
commit83bbda80b7701cfb8b9f1590f7f47e452351fea5 (patch)
treedb07b573bc54d8426ff364aacb25362639bf9796 /tests/hover_test.odin
parent03091375333703fc78ac9aafd508155436537f52 (diff)
Resolve generic overloaded procs that don't have a return value
Diffstat (limited to 'tests/hover_test.odin')
-rw-r--r--tests/hover_test.odin22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/hover_test.odin b/tests/hover_test.odin
index d8e18be..c64f328 100644
--- a/tests/hover_test.odin
+++ b/tests/hover_test.odin
@@ -4408,6 +4408,28 @@ ast_hover_parapoly_elem_overloaded_proc_multiple_options :: proc(t: ^testing.T)
}
test.expect_hover(t, &source, "test.foo: proc {\n\tfoo_int :: proc(i: int),\n\tfoo_string :: proc(s: string),\n}")
}
+
+@(test)
+ast_hover_overloaded_proc_slice_dynamic_array :: proc(t: ^testing.T) {
+ source := test.Source {
+ main = `package test
+
+ foo :: proc {
+ foo_slice,
+ foo_dynamic,
+ }
+
+ foo_dynamic :: proc(array: $A/[dynamic]$T) {}
+ foo_slice :: proc(array: $A/[]$T) {}
+
+ main :: proc() {
+ foos: [dynamic]int
+ f{*}oo(foos)
+ }
+ `,
+ }
+ test.expect_hover(t, &source, "test.foo: proc(array: $A/[dynamic]$T)")
+}
/*
Waiting for odin fix