aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDanielGavin <danielgavin5@hotmail.com>2025-06-07 21:31:44 +0200
committerGitHub <noreply@github.com>2025-06-07 21:31:44 +0200
commita42400e0c9f1471ec27454476f6fe6c19dc95242 (patch)
treed1626db02ab4f255806fac323fc386163b60ca53 /tests
parentc2a2283bf4e0cc2c2b25a6ee2014a18c3b11f3c7 (diff)
parent24e32736b3c19b541a810e07927db50d71e07423 (diff)
Merge pull request #648 from BradLewis/feat/add-hover-to-enum-values
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..bdd583a 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, "test.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, int }
+
+ bar: Bar
+ bar = .Fo{*}o1
+ `
+ }
+
+ test.expect_hover(t, &source, "test.Bar: .Foo1")
+}
+
/*
Waiting for odin fix