cgen: fix small g.is_autofree && [manualfree] problem
parent
29c2240aef
commit
dff36a9947
|
@ -465,7 +465,7 @@ fn (mut g Gen) method_call(node ast.CallExpr) {
|
|||
node.from_embed_type == 0 {
|
||||
g.write('/*rec*/*')
|
||||
}
|
||||
if node.free_receiver && !g.inside_lambda && !g.is_builtin_mod {
|
||||
if g.is_autofree && node.free_receiver && !g.inside_lambda && !g.is_builtin_mod {
|
||||
// The receiver expression needs to be freed, use the temp var.
|
||||
fn_name := node.name.replace('.', '_')
|
||||
arg_name := '_arg_expr_${fn_name}_0_$node.pos.pos'
|
||||
|
|
Loading…
Reference in New Issue