mirror of
https://github.com/vlang/v.git
synced 2025-09-13 14:32:26 +03:00
v fmt
This commit is contained in:
parent
a0a564a394
commit
961877f98e
1 changed files with 2 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue