diff options
| author | Brad Lewis <22850972+BradLewis@users.noreply.github.com> | 2025-09-10 20:45:03 -0400 |
|---|---|---|
| committer | Brad Lewis <22850972+BradLewis@users.noreply.github.com> | 2025-09-10 20:45:55 -0400 |
| commit | 547fdadd808ae6b0bbaaaba17deaaca3582cbc41 (patch) | |
| tree | aa4682983eb675ed28aab038115a1905c369ad6e /tests | |
| parent | f3ae71ff7f6e3713e42c9fc65c735babba5caff0 (diff) | |
Correctly resolve comp lits in map keys
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/hover_test.odin | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/hover_test.odin b/tests/hover_test.odin index a4769cb..8660eb7 100644 --- a/tests/hover_test.odin +++ b/tests/hover_test.odin @@ -4629,6 +4629,27 @@ ast_hover_assign_comp_lit_with_multiple_assigns_second :: proc(t: ^testing.T) { } test.expect_hover(t, &source, "Bar.b: int") } + +@(test) +ast_hover_comp_lit_map_key :: proc(t: ^testing.T) { + source := test.Source { + main = `package test + Foo :: struct { + a: int, + } + + Bar :: struct { + b: int, + } + + main :: proc() { + m: map[Foo]Bar + m[{a{*} = 1}] = {b = 2} + } + `, + } + test.expect_hover(t, &source, "Foo.a: int") +} /* Waiting for odin fix |