aboutsummaryrefslogtreecommitdiff
path: root/tests/hover_test.odin
diff options
context:
space:
mode:
authorBrad Lewis <22850972+BradLewis@users.noreply.github.com>2025-09-16 18:14:01 -0400
committerBrad Lewis <22850972+BradLewis@users.noreply.github.com>2025-09-16 18:14:01 -0400
commit01e247bb7a4142713fba8ac2c60fb0085816078d (patch)
treeec5a37dfe0b72e56c630c6b347142206a5caa889 /tests/hover_test.odin
parentc3195c07d4756219bb01f5815bd5e76285f959d9 (diff)
Correct implicit selector expressions within binary expressions
Diffstat (limited to 'tests/hover_test.odin')
-rw-r--r--tests/hover_test.odin19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/hover_test.odin b/tests/hover_test.odin
index 3f6bb3b..402e38a 100644
--- a/tests/hover_test.odin
+++ b/tests/hover_test.odin
@@ -4802,6 +4802,25 @@ ast_hover_proc_group_with_generic_type_from_proc_param :: proc(t: ^testing.T) {
}
test.expect_hover(t, &source, "test.append: proc(array: ^$T/[dynamic]$E, arg: E)")
}
+
+@(test)
+ast_hover_enum_implicit_if_statement :: proc(t: ^testing.T) {
+ source := test.Source {
+ main = `package test
+ Foo :: enum {
+ A,
+ B,
+ }
+
+ main :: proc() {
+ foo: Foo
+ if foo == .A{*} {
+ }
+ }
+ `,
+ }
+ test.expect_hover(t, &source, "test.Foo: .A")
+}
/*
Waiting for odin fix