diff options
| author | Brad Lewis <22850972+BradLewis@users.noreply.github.com> | 2026-02-08 12:31:44 +1100 |
|---|---|---|
| committer | Brad Lewis <22850972+BradLewis@users.noreply.github.com> | 2026-02-08 12:31:44 +1100 |
| commit | 187e8033a37207cb38db9453d8e17299227716e7 (patch) | |
| tree | 9968a468f0db1ac1cb364b3cf7c8165524adf04d /tests/hover_test.odin | |
| parent | 8f0f0f62358f321d3612a45ae8c6600fc17db4b9 (diff) | |
Fix parapoly union types being overridden incorrectly
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 |