diff options
| author | Brad Lewis <22850972+BradLewis@users.noreply.github.com> | 2026-02-10 14:50:36 +1100 |
|---|---|---|
| committer | Brad Lewis <22850972+BradLewis@users.noreply.github.com> | 2026-02-10 14:50:36 +1100 |
| commit | cbdd09b0ef47234e42a3f6d9133381c3d11f4b40 (patch) | |
| tree | 82f2118ad3619ca01ea3196334c199f358f90b4a /tests/hover_test.odin | |
| parent | 583a67c9dab57e0926e47424b2cf651e2e514553 (diff) | |
Correctly resolve poly types from nested function calls that contain more than one return value
Diffstat (limited to 'tests/hover_test.odin')
| -rw-r--r-- | tests/hover_test.odin | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/hover_test.odin b/tests/hover_test.odin index df65f3a..5dc6c91 100644 --- a/tests/hover_test.odin +++ b/tests/hover_test.odin @@ -6055,6 +6055,26 @@ ast_hover_union_multiple_poly :: proc(t: ^testing.T) { } test.expect_hover(t, &source, "test.Bazz :: union(T) {\n\tFoo(T),\n\tBar,\n}") } + +@(test) +ast_hover_poly_proc_passthrough :: proc(t: ^testing.T) { + source := test.Source { + main = `package test + make :: proc() -> (int, bool) { + return 1, true + } + + confirm_bool_one :: #force_inline proc(v: $T, ok: $B) -> (T, bool) { + return v, bool(ok) + } + + main :: proc() { + v{*}alue, ok := confirm_bool_one(make()) + } + `, + } + test.expect_hover(t, &source, "test.value: int") +} /* Waiting for odin fix |