From 5102e42c274a8e43e2bc49fe47b7aafbdf0d23f9 Mon Sep 17 00:00:00 2001 From: Damian Tarnawski Date: Fri, 26 Sep 2025 20:49:05 +0200 Subject: Add inlay hints for implicit return values (closes #1058) --- tests/inlay_hints_test.odin | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'tests') 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 -- cgit v1.2.3