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:
parent
9f3b6e3e3a
commit
029d583bb2
@ -1751,9 +1751,13 @@ fn (mut g Gen) stmt(node ast.Stmt) {
|
||||
// }
|
||||
if g.inside_ternary == 0 && !g.inside_if_optional && !g.inside_match_optional
|
||||
&& !node.is_expr && node.expr !is ast.IfExpr {
|
||||
if node.expr is ast.MatchExpr {
|
||||
g.writeln('')
|
||||
} else {
|
||||
g.writeln(';')
|
||||
}
|
||||
}
|
||||
}
|
||||
ast.FnDecl {
|
||||
g.fn_decl(node)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user