1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00
This commit is contained in:
Felipe Pena 2023-03-16 18:16:06 -03:00
parent a484697958
commit 17f9b640ed

View File

@ -1245,7 +1245,8 @@ fn (mut g Gen) method_call(node ast.CallExpr) {
g.expr(node.left)
}
} else {
if has_str_method && left_type.is_ptr() && !node.receiver_type.is_ptr() {
if node.left is ast.Ident && has_str_method && left_type.is_ptr()
&& !node.receiver_type.is_ptr() {
g.write('*')
}
g.expr(node.left)