diff options
| author | Damian Tarnawski <gthetarnav@gmail.com> | 2025-09-26 20:49:05 +0200 |
|---|---|---|
| committer | Damian Tarnawski <gthetarnav@gmail.com> | 2025-09-26 20:49:05 +0200 |
| commit | 5102e42c274a8e43e2bc49fe47b7aafbdf0d23f9 (patch) | |
| tree | 94b3419d1c5f7b1232ee5f1d57680683306f38ea /tests | |
| parent | be068e5dad39f502c6ed7cf6b3e64a46c9540e0d (diff) | |
Add inlay hints for implicit return values (closes #1058)
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/inlay_hints_test.odin | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/inlay_hints_test.odin b/tests/inlay_hints_test.odin index c5600cc..76d8bcd 100644 --- a/tests/inlay_hints_test.odin +++ b/tests/inlay_hints_test.odin @@ -205,3 +205,26 @@ ast_inlay_hints_disabled :: proc(t: ^testing.T) { test.expect_inlay_hints(t, &source) } + +@(test) +ast_inlay_hints_implicit_return_values :: proc(t: ^testing.T) { + source := test.Source { + main = `package test + + foo :: proc () -> (res: int, ok: bool) { + + if !condition() do return[[ res, ok]] + + condition() or_return[[ res, тоб]] + + return value, true + } + `, + packages = {}, + config = { + enable_inlay_hints_implicit_return = true, + }, + } + + test.expect_inlay_hints(t, &source) +}
\ No newline at end of file |