aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBrad Lewis <22850972+BradLewis@users.noreply.github.com>2025-10-25 19:13:59 -0400
committerBrad Lewis <22850972+BradLewis@users.noreply.github.com>2025-10-25 19:13:59 -0400
commit2bd0bb05fe74a5923b79c8dc674ee84c1fcb29f3 (patch)
tree3f63ab9a967b135d1128cee347a5d63c91467ec4 /tests
parent3c5a77c625d9946515235548165cad8e80db85ef (diff)
Fix provided incorrect completions for named call args
Diffstat (limited to 'tests')
-rw-r--r--tests/completions_test.odin26
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/completions_test.odin b/tests/completions_test.odin
index 74de905..01f718b 100644
--- a/tests/completions_test.odin
+++ b/tests/completions_test.odin
@@ -4802,3 +4802,29 @@ ast_completion_array_comp_lit :: proc(t: ^testing.T) {
}
test.expect_completion_docs(t, &source, "", {"test.foo1: int", "test.foo2: int"})
}
+
+@(test)
+ast_completion_named_proc_arg_comp_lit :: proc(t: ^testing.T) {
+ source := test.Source {
+ main = `package test
+ Foo :: struct {
+ foo: string,
+ }
+
+ Bar :: struct {
+ bar: int,
+ }
+
+ bazz :: proc(foos: []Foo = {}, bars: []Bar = {}) {}
+
+ main :: proc() {
+ bazz(bars = {
+ {
+ {*}
+ }
+ })
+ }
+ `,
+ }
+ test.expect_completion_docs(t, &source, "", {"Bar.bar: int"})
+}