diff options
| author | Bradley Lewis <22850972+BradLewis@users.noreply.github.com> | 2026-02-08 13:30:29 +1100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-02-08 13:30:29 +1100 |
| commit | 7d75d1e483c761fb7862cec65c96b94620b8aa19 (patch) | |
| tree | 556bbc68ca2debbff79fd168e04d34a217835d61 /tests/hover_test.odin | |
| parent | 193e6ebd245fca345d83e5c4cbfd6cf7b5b062de (diff) | |
| parent | 8f414b2d8a1a79392887d1e188f2bc6814cdf7c1 (diff) | |
Merge pull request #1279 from BradLewis/switch-code-action
Only append the missing cases, fix issues with parapoly unions
Diffstat (limited to 'tests/hover_test.odin')
| -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 02cde4e..df65f3a 100644 --- a/tests/hover_test.odin +++ b/tests/hover_test.odin @@ -6034,6 +6034,27 @@ ast_hover_constant_unary_expr :: proc(t: ^testing.T) { } test.expect_hover(t, &source, "test.FOO :: ~u32(0)") } + +@(test) +ast_hover_union_multiple_poly :: proc(t: ^testing.T) { + source := test.Source { + main = `package test + Foo :: struct($T: typeid) {} + Bar :: struct{} + + Bazz :: union($T: typeid) { + Foo(T), + Bar, + } + + main :: proc() { + T :: distinct int + bazz: Ba{*}zz(T) + } + `, + } + test.expect_hover(t, &source, "test.Bazz :: union(T) {\n\tFoo(T),\n\tBar,\n}") +} /* Waiting for odin fix |