Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

parser: optimize method parameter detection in used check #22915

Merged
merged 1 commit into from
Nov 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
spytheman marked this conversation as resolved.
Show resolved Hide resolved
is_arg: true
ct_type_var: if (!is_method || k > 0) && param.typ.has_flag(.generic)
&& !param.typ.has_flag(.variadic) {
Expand Down
Loading