diff --git a/vlib/v/checker/if.v b/vlib/v/checker/if.v index d621f1b4c1..dae07cb727 100644 --- a/vlib/v/checker/if.v +++ b/vlib/v/checker/if.v @@ -55,7 +55,8 @@ fn (mut c Checker) if_expr(mut node ast.IfExpr) ast.Type { if comptime_if_multi_pass_branch { comptime_if_has_multi_pass_branch = true } - if !comptime_if_result && !comptime_if_has_multi_pass_branch && comptime_if_found_branch { + if !comptime_if_result && !comptime_if_has_multi_pass_branch + && comptime_if_found_branch { // when curr cond is false, single pass branchs, and already has a true branch: // remove following branchs' stmts comptime_if_multi_pass_branch = false