Skip to content

Commit

Permalink
parser: optimize method parameter detection in used check
Browse files Browse the repository at this point in the history
  • Loading branch information
ttytm committed Nov 19, 2024
1 parent faac1fd commit 018d9de
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions vlib/v/parser/fn.v
Original file line number Diff line number Diff line change
Expand Up @@ -504,8 +504,7 @@ run them via `v file.v` instead',
is_auto_deref: param.is_mut
is_stack_obj: is_stack_obj
pos: param.pos
is_used: is_pub || no_body
|| (is_method && rec.type_pos == param.type_pos) || p.builtin_mod
is_used: is_pub || no_body || (is_method && k == 0) || p.builtin_mod
is_arg: true
ct_type_var: if (!is_method || k > 0) && param.typ.has_flag(.generic)
&& !param.typ.has_flag(.variadic) {
Expand Down

0 comments on commit 018d9de

Please sign in to comment.