mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 03:47:35 +00:00
LibWeb: Get argument count from Function::parameters::size()
Previously this retrieved argument count from Function::length() which did not return the correct count in all situations.
This commit is contained in:
parent
ba23d036bd
commit
887e13f364
1 changed files with 1 additions and 1 deletions
|
@ -1530,7 +1530,7 @@ JS_DEFINE_NATIVE_FUNCTION(@class_name@::@function.name:snakecase@)
|
||||||
auto fetched_arguments = 0u;
|
auto fetched_arguments = 0u;
|
||||||
for (auto i = 0u; i < overloaded_functions.size(); ++i) {
|
for (auto i = 0u; i < overloaded_functions.size(); ++i) {
|
||||||
auto const& overloaded_function = overloaded_functions[i];
|
auto const& overloaded_function = overloaded_functions[i];
|
||||||
auto argument_count = overloaded_function.length();
|
auto argument_count = overloaded_function.parameters.size();
|
||||||
|
|
||||||
function_generator.set("argument_count", String::number(argument_count));
|
function_generator.set("argument_count", String::number(argument_count));
|
||||||
function_generator.set("arguments_match_check", generate_arguments_match_check(overloaded_function));
|
function_generator.set("arguments_match_check", generate_arguments_match_check(overloaded_function));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue