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

cgen: fix debug generated code with -g, while fixing #16690 (#16723)

This commit is contained in:
Felipe Pena 2022-12-20 11:41:42 -03:00 committed by GitHub
parent 3c920f2ee6
commit 2f9becc98d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2483,8 +2483,9 @@ fn (mut g Gen) expr_with_cast(expr ast.Expr, got_type_raw ast.Type, expected_typ
tmp_var := g.new_tmp_var()
g.write('${got_styp} ${tmp_var} = ')
g.expr(expr)
g.write(';')
g.writeln(';')
g.write(stmt_str)
g.write(' ')
g.write('${fname}(&${tmp_var})')
return
} else {