cgen: fix indent in multi_return (#5617)

pull/5620/head
yuyi 2020-07-02 17:08:27 +08:00 committed by GitHub
parent e904732554
commit c21527d3c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -2482,7 +2482,9 @@ fn (mut g Gen) return_statement(node ast.Return) {
g.write('return $opt_tmp') g.write('return $opt_tmp')
} }
// Make sure to add our unpacks // Make sure to add our unpacks
if multi_unpack.len > 0 {
g.insert_before_stmt(multi_unpack) g.insert_before_stmt(multi_unpack)
}
} else if node.exprs.len >= 1 { } else if node.exprs.len >= 1 {
// normal return // normal return
return_sym := g.table.get_type_symbol(node.types[0]) return_sym := g.table.get_type_symbol(node.types[0])