From 7ee64314fdd05984c65b1aa6df7ef3cd2dd435cd Mon Sep 17 00:00:00 2001 From: Brad Lewis <22850972+BradLewis@users.noreply.github.com> Date: Thu, 5 Jun 2025 19:29:33 -0400 Subject: Add hover support for implicit selector expr --- tests/hover_test.odin | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) (limited to 'tests') diff --git a/tests/hover_test.odin b/tests/hover_test.odin index 9f1a9f0..dafc81c 100644 --- a/tests/hover_test.odin +++ b/tests/hover_test.odin @@ -376,6 +376,42 @@ ast_hover_proc_with_proc_parameter_with_return :: proc(t: ^testing.T) { test.expect_hover(t, &source, "test.aa: proc(p: proc() -> int)") } +@(test) +ast_hover_enum_implicit_selector :: proc(t: ^testing.T) { + source := test.Source { + main = `package test + Foo :: enum { + Foo1, + Foo2, + } + + foo: Foo + foo = .Fo{*}o1 + ` + } + + test.expect_hover(t, &source, "Foo.Foo1") +} + +@(test) +ast_hover_union_implicit_selector :: proc(t: ^testing.T) { + source := test.Source { + main = `package test + Foo :: enum { + Foo1, + Foo2, + } + + Bar :: union { Foo } + + bar: Bar + bar = .Fo{*}o1 + ` + } + + test.expect_hover(t, &source, "Bar.Foo1") +} + /* Waiting for odin fix -- cgit v1.2.3