From 5e3467dfd177531903cdd6b4b2d2fedc187e2b3d Mon Sep 17 00:00:00 2001 From: Brad Lewis <22850972+BradLewis@users.noreply.github.com> Date: Sun, 27 Jul 2025 14:59:02 -0400 Subject: Ensure ast_context is reset after attempt to handle an implicit selector completion in a function call --- tests/completions_test.odin | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'tests') diff --git a/tests/completions_test.odin b/tests/completions_test.odin index f8b55f1..1389550 100644 --- a/tests/completions_test.odin +++ b/tests/completions_test.odin @@ -4052,3 +4052,24 @@ ast_completion_enum_global_array :: proc(t: ^testing.T) { test.expect_completion_details(t, &source, "", {"A", "B"}) } + +@(test) +ast_completion_enum_array_in_proc_param :: proc(t: ^testing.T) { + source := test.Source { + main = `package test + Foo :: enum { + A, + B, + } + + bar :: proc(v: i32) {} + + main :: proc() { + foos: [Foo]i32 + bar(foos[.{*}]) + } + `, + } + + test.expect_completion_details(t, &source, "", {"A", "B"}) +} -- cgit v1.2.3