aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBrad Lewis <22850972+BradLewis@users.noreply.github.com>2025-09-16 14:52:54 -0400
committerBrad Lewis <22850972+BradLewis@users.noreply.github.com>2025-09-16 14:52:54 -0400
commitfc61cb706555c41d8b5afe1cf2bc93d343d960e4 (patch)
tree308705bf10eb11f69f45b40a8b2e4843d818536d /tests
parentc188c31e0eb9d4465346e337e9c8813b2cea6fd4 (diff)
Correctly resolve variadic args as a slice
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 37d0362..f1577c8 100644
--- a/tests/hover_test.odin
+++ b/tests/hover_test.odin
@@ -4738,6 +4738,28 @@ ast_hover_proc_group_parapoly_matrix :: proc(t: ^testing.T) {
}
test.expect_hover(t, &source, "test.c: matrix[3,2]int")
}
+
+@(test)
+ast_hover_proc_group_variadic_args :: proc(t: ^testing.T) {
+ source := test.Source {
+ main = `package test
+ append_elems :: proc(array: ^$T/[dynamic]string, args: ..string) {}
+ append_elem :: proc(array: ^$T/[dynamic]string, arg: string) {}
+
+ 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]string, args: ..string)")
+}
/*
Waiting for odin fix