diff options
| author | Bradley Lewis <22850972+BradLewis@users.noreply.github.com> | 2025-08-11 20:06:00 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-08-11 20:06:00 -0400 |
| commit | 848d46e939d91c9b5067d2f5b3cc034f20b20612 (patch) | |
| tree | 4bbf44a1946cffc5bc886aa89775011805b57dbc /tests | |
| parent | 36488812d99059c5a6f4453bf4b176461c125a7f (diff) | |
| parent | f43f8593b1b6c54104d3ff20470e5217592b5405 (diff) | |
Merge pull request #856 from BradLewis/feat/clean-completions-struct-decl
Remove functions, consts, variables and fields when in struct definitions
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/completions_test.odin | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/completions_test.odin b/tests/completions_test.odin index 675002e..ca1d5a5 100644 --- a/tests/completions_test.odin +++ b/tests/completions_test.odin @@ -4323,3 +4323,23 @@ ast_completion_proc_variadiac_arg :: proc(t: ^testing.T) { } test.expect_completion_docs( t, &source, "", {"test.Foo: enum {..}"}) } + +@(test) +ast_completion_within_struct_decl :: proc(t: ^testing.T) { + source := test.Source { + main = `package test + Foo :: enum { + A, + B, + C, + } + + foo :: proc(f: Foo) {} + + Bar :: struct { + bar: f{*} + } + `, + } + test.expect_completion_docs( t, &source, "", {"test.Foo: enum {..}"}, {"test.foo: proc(f: Foo)"}) +} |