mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
cgen: remove condition no longer needed after #15944
This commit is contained in:
parent
3eff20c5fd
commit
87a364ff24
@ -1097,9 +1097,8 @@ fn (mut g Gen) method_call(node ast.CallExpr) {
|
||||
}
|
||||
}
|
||||
is_node_name_in_first_last_repeat := node.name in ['first', 'last', 'repeat']
|
||||
if node.receiver_type.is_ptr() && (!left_type.is_ptr() || left_type.has_flag(.variadic)
|
||||
|| node.from_embed_types.len != 0
|
||||
|| (left_type.has_flag(.shared_f) && node.name != 'str')) {
|
||||
if node.receiver_type.is_ptr() && (!left_type.is_ptr()
|
||||
|| node.from_embed_types.len != 0 || (left_type.has_flag(.shared_f) && node.name != 'str')) {
|
||||
// The receiver is a reference, but the caller provided a value
|
||||
// Add `&` automatically.
|
||||
// TODO same logic in call_args()
|
||||
|
Loading…
Reference in New Issue
Block a user