From 97b78eb0e090f6f5f9027cbc95fff3a2a9c38fba Mon Sep 17 00:00:00 2001 From: Brad Lewis <22850972+BradLewis@users.noreply.github.com> Date: Sun, 2 Nov 2025 15:46:16 -0500 Subject: Support iterating over an enum --- tests/hover_test.odin | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'tests/hover_test.odin') diff --git a/tests/hover_test.odin b/tests/hover_test.odin index 1ee56d4..b598c24 100644 --- a/tests/hover_test.odin +++ b/tests/hover_test.odin @@ -5394,6 +5394,20 @@ ast_hover_local_const_binary_expr_with_type :: proc(t: ^testing.T) { } test.expect_hover(t, &source, "test.foo : i32 : 1 + 2") } + +@(test) +ast_hover_loop_over_enum :: proc(t: ^testing.T) { + source := test.Source { + main = `package test + Foo :: enum {A, B, C} + main :: proc() { + for f{*}oo in Foo {} + } + + `, + } + test.expect_hover(t, &source, "test.foo: test.Foo") +} /* Waiting for odin fix -- cgit v1.2.3