diff options
| author | Brad Lewis <22850972+BradLewis@users.noreply.github.com> | 2025-09-11 20:53:36 -0400 |
|---|---|---|
| committer | Brad Lewis <22850972+BradLewis@users.noreply.github.com> | 2025-09-11 20:53:36 -0400 |
| commit | 968712e40186abaf5447f69cc73b197af9d94600 (patch) | |
| tree | eac561845f431f145e055a4e333a851e13562d0f /tests | |
| parent | 7b5eac698391e9d0b2d6fdac4ce4a857f92c33f2 (diff) | |
Resolve hover information for nested struct and bitfield fields
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/hover_test.odin | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/hover_test.odin b/tests/hover_test.odin index 8660eb7..72a68b5 100644 --- a/tests/hover_test.odin +++ b/tests/hover_test.odin @@ -4650,6 +4650,36 @@ ast_hover_comp_lit_map_key :: proc(t: ^testing.T) { } test.expect_hover(t, &source, "Foo.a: int") } + +@(test) +ast_hover_inner_struct_field :: proc(t: ^testing.T) { + source := test.Source { + main = `package test + Foo :: struct { + a: int, + b: struct { + c{*}: int, + } + } + `, + } + test.expect_hover(t, &source, "struct.c: int") +} + +@(test) +ast_hover_using_bit_field_struct :: proc(t: ^testing.T) { + source := test.Source { + main = `package test + Foo :: struct { + a: int, + using _: bit_field u8 { + c{*}: u8 | 8, + }, + } + `, + } + test.expect_hover(t, &source, "bit_field.c: u8 | 8") +} /* Waiting for odin fix |