1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

cgen: a minor fix in match_expr (#14983)

This commit is contained in:
yuyi 2022-07-07 23:51:27 +08:00 committed by GitHub
parent 9f3b6e3e3a
commit 029d583bb2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1751,7 +1751,11 @@ fn (mut g Gen) stmt(node ast.Stmt) {
// } // }
if g.inside_ternary == 0 && !g.inside_if_optional && !g.inside_match_optional if g.inside_ternary == 0 && !g.inside_if_optional && !g.inside_match_optional
&& !node.is_expr && node.expr !is ast.IfExpr { && !node.is_expr && node.expr !is ast.IfExpr {
g.writeln(';') if node.expr is ast.MatchExpr {
g.writeln('')
} else {
g.writeln(';')
}
} }
} }
ast.FnDecl { ast.FnDecl {