mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
cgen: fix wrong indent generation in anon fn decl (#17879)
This commit is contained in:
parent
d30e1a52e2
commit
b2cf6d0af4
@ -379,6 +379,11 @@ fn (mut g Gen) gen_fn_decl(node &ast.FnDecl, skip bool) {
|
||||
}
|
||||
prev_inside_ternary := g.inside_ternary
|
||||
g.inside_ternary = 0
|
||||
prev_indent := g.indent
|
||||
g.indent = 0
|
||||
defer {
|
||||
g.indent = prev_indent
|
||||
}
|
||||
g.stmts(node.stmts)
|
||||
g.inside_ternary = prev_inside_ternary
|
||||
if node.is_noreturn {
|
||||
|
Loading…
Reference in New Issue
Block a user