diff options
| author | Brad Lewis <22850972+BradLewis@users.noreply.github.com> | 2025-11-02 15:46:16 -0500 |
|---|---|---|
| committer | Brad Lewis <22850972+BradLewis@users.noreply.github.com> | 2025-11-02 15:46:16 -0500 |
| commit | 97b78eb0e090f6f5f9027cbc95fff3a2a9c38fba (patch) | |
| tree | 5af39dbbc8fa48fe0d6548c65e9b46583989e1ed /tests | |
| parent | af3a10a0e3030e8360607982d22781b59bcb6cb9 (diff) | |
Support iterating over an enum
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/hover_test.odin | 14 |
1 files changed, 14 insertions, 0 deletions
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 |