Skip to content

Commit

Permalink
Merge branch 'fix_default_type_with_ref' of https://github.com/felipe…
Browse files Browse the repository at this point in the history
…nsp/v into fix_default_type_with_ref
  • Loading branch information
felipensp committed Nov 10, 2024
2 parents 25975d7 + fa6954e commit 82425cb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vlib/v/gen/c/str.v
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ fn (mut g Gen) gen_expr_to_string(expr ast.Expr, etype ast.Type) {
is_var_mut := expr.is_auto_deref_var()
str_fn_name := g.get_str_fn(typ)
g.write('${str_fn_name}(')
if sym.kind != .function {
if sym.kind != .function {
if str_method_expects_ptr && !is_ptr && !typ.has_flag(.option) {
g.write('&')
} else if (!str_method_expects_ptr && is_ptr && !is_shared) || is_var_mut {
Expand Down

0 comments on commit 82425cb

Please sign in to comment.