From 545525ce40d6f186a2a6f205d503ad1d113d317b Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Tue, 21 Apr 2026 05:04:57 +0300 Subject: [PATCH] vfmt: fix single-line short if expressions forced to multi-line (fixes #26915) --- vlib/v/fmt/tests/if_ternary_keep.vv | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vlib/v/fmt/tests/if_ternary_keep.vv b/vlib/v/fmt/tests/if_ternary_keep.vv index 1dae22f43..d079aca1d 100644 --- a/vlib/v/fmt/tests/if_ternary_keep.vv +++ b/vlib/v/fmt/tests/if_ternary_keep.vv @@ -9,6 +9,8 @@ struct Foo { fn valid_single_line() { // Variable initialization + number := if condition { 42 } else { 0 } + status := if code == 200 { 'OK' } else { 'Error' } a, b := if true { 'a', 'b' } else { 'b', 'a' } // Variable assignment mut x := 'abc' -- 2.39.5