Skip to content

Commit

Permalink
transformer: do not do the simplification, when -autofree is on
Browse files Browse the repository at this point in the history
  • Loading branch information
spytheman committed Oct 9, 2024
1 parent a559846 commit 238d565
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion vlib/v/transformer/transformer.v
Original file line number Diff line number Diff line change
Expand Up @@ -1161,6 +1161,9 @@ pub fn (mut t Transformer) fn_decl_trace_calls(mut node ast.FnDecl) {
}

pub fn (mut t Transformer) simplify_nested_interpolation_in_sb(mut onode ast.Stmt, mut nexpr ast.CallExpr, ntype ast.Type) bool {
if t.pref.autofree {
return false
}
if nexpr.args[0].expr !is ast.StringInterLiteral {
return false
}
Expand Down Expand Up @@ -1209,7 +1212,7 @@ pub fn (mut t Transformer) simplify_nested_interpolation_in_sb(mut onode ast.Stm
},
]
})
typ: ntype
typ: ntype
}
calls << ncall
}
Expand Down

0 comments on commit 238d565

Please sign in to comment.