v.gen.c: fix `v -cstrict -o vtmp_werror cmd/v` on Apple M1

pull/10877/head
Delyan Angelov 2021-07-20 16:09:47 +03:00
parent 5098334e65
commit 2c9f6899ba
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED
1 changed files with 1 additions and 1 deletions

View File

@ -3821,7 +3821,7 @@ fn (mut g Gen) match_expr(node ast.MatchExpr) {
g.empty_line = true
cur_line = g.go_before_stmt(0).trim_left(' \t')
tmp_var = g.new_tmp_var()
g.writeln('${g.typ(node.return_type)} $tmp_var;')
g.writeln('${g.typ(node.return_type)} $tmp_var = ${g.type_default(node.return_type)};')
}
if is_expr && !need_tmp_var {