mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
cgen: simplify codegen for optional consts (#13948)
This commit is contained in:
@ -698,7 +698,7 @@ fn (mut g Gen) call_expr(node ast.CallExpr) {
|
||||
} else if g.table.sym(node.return_type).kind == .multi_return {
|
||||
g.write('\n $cur_line $tmp_opt /*U*/')
|
||||
} else {
|
||||
if !g.inside_const || !g.inside_const_optional {
|
||||
if !g.inside_const_optional {
|
||||
g.write('\n $cur_line (*($unwrapped_styp*)${tmp_opt}.data)')
|
||||
} else {
|
||||
g.write('\n $cur_line $tmp_opt')
|
||||
|
Reference in New Issue
Block a user