aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
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"})
+}