Skip to content

Conversation

0xe
Copy link
Contributor

@0xe 0xe commented Oct 9, 2025

Spec says length should only include arguments up to the first default argument. This ensures we adhere to that.

@0xe 0xe force-pushed the scratch/satish/def-args-length branch from 8442cbd to 697c734 Compare October 10, 2025 07:14
}
}
}
if (arity != paramCount) break;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't need this if - the only time you assign arity is at like 538, which is already followed by a break

if (params != null && !params.isEmpty()) {
for (int i = 0; i < defaultParams.size(); i += 2) {
if (defaultParams.get(i) instanceof String) {
String paramWithDefault = (String) defaultParams.get(i);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: I would just declare this before the if above

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants