diff --git a/vlib/v/checker/checker.v b/vlib/v/checker/checker.v index 6b838c050c..5f5582d4f8 100644 --- a/vlib/v/checker/checker.v +++ b/vlib/v/checker/checker.v @@ -1044,8 +1044,9 @@ pub fn (mut c Checker) call_expr(mut call_expr ast.CallExpr) table.Type { } call_expr.args[i].is_tmp_autofree = true } + // TODO copy pasta from above if call_expr.receiver_type == table.string_type && !(call_expr.left is ast.Ident || - call_expr.left is ast.StringLiteral) { + call_expr.left is ast.StringLiteral || call_expr.left is ast.SelectorExpr) { call_expr.free_receiver = true } }