aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBrad Lewis <22850972+BradLewis@users.noreply.github.com>2025-09-16 15:14:40 -0400
committerBrad Lewis <22850972+BradLewis@users.noreply.github.com>2025-09-16 15:19:54 -0400
commitf3223ddbaeed978da5de5d70667f146637b07293 (patch)
treec6ca53edaf12148ad8e4ca63be8d7eee984c52a6 /tests
parentfc61cb706555c41d8b5afe1cf2bc93d343d960e4 (diff)
Correctly resolve generic variadic args
Diffstat (limited to 'tests')
-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 f1577c8..2d50c51 100644
--- a/tests/hover_test.odin
+++ b/tests/hover_test.odin
@@ -4760,6 +4760,28 @@ ast_hover_proc_group_variadic_args :: proc(t: ^testing.T) {
}
test.expect_hover(t, &source, "test.append: proc(array: ^$T/[dynamic]string, args: ..string)")
}
+
+@(test)
+ast_hover_proc_group_variadic_args_with_generic_type :: proc(t: ^testing.T) {
+ source := test.Source {
+ main = `package test
+ append_elems :: proc(array: ^$T/[dynamic]$E, args: ..E) {}
+ append_elem :: proc(array: ^$T/[dynamic]$E, arg: E) {}
+
+ append :: proc {
+ append_elem,
+ append_elems,
+ }
+
+ main :: proc() {
+ foos: [dynamic]string
+ bars: [dynamic]string
+ app{*}end(&bars, ..foos[:])
+ }
+ `,
+ }
+ test.expect_hover(t, &source, "test.append: proc(array: ^$T/[dynamic]$E, args: ..E)")
+}
/*
Waiting for odin fix