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

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

This commit is contained in:
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

View File

@ -3821,7 +3821,7 @@ fn (mut g Gen) match_expr(node ast.MatchExpr) {
g.empty_line = true g.empty_line = true
cur_line = g.go_before_stmt(0).trim_left(' \t') cur_line = g.go_before_stmt(0).trim_left(' \t')
tmp_var = g.new_tmp_var() 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 { if is_expr && !need_tmp_var {