aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBrad Lewis <22850972+BradLewis@users.noreply.github.com>2025-06-05 19:29:33 -0400
committerBrad Lewis <22850972+BradLewis@users.noreply.github.com>2025-06-05 20:37:41 -0400
commit7ee64314fdd05984c65b1aa6df7ef3cd2dd435cd (patch)
treef54555a694fe63f0e8e4873fb4be6f55889bc65e /tests
parentc2a2283bf4e0cc2c2b25a6ee2014a18c3b11f3c7 (diff)
Add hover support for implicit selector expr
Diffstat (limited to 'tests')
-rw-r--r--tests/hover_test.odin36
1 files changed, 36 insertions, 0 deletions
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