1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 00:37:45 +00:00

LibJS: Explicitly return and accept a Function* in species_constructor

The second argument (the default constructor) and the return value have
to be constructors (as a result functions), so we can require that
explicitly by using appropriate types.
This commit is contained in:
Idan Horowitz 2021-06-10 23:50:48 +03:00 committed by Linus Groh
parent 4531f689ff
commit b041108a1e
3 changed files with 5 additions and 5 deletions

View file

@ -372,7 +372,7 @@ bool same_value_non_numeric(Value lhs, Value rhs);
TriState abstract_relation(GlobalObject&, bool left_first, Value lhs, Value rhs);
Function* get_method(GlobalObject& global_object, Value, const PropertyName&);
size_t length_of_array_like(GlobalObject&, const Object&);
Object* species_constructor(GlobalObject&, const Object&, Object& default_constructor);
Function* species_constructor(GlobalObject&, const Object&, Function& default_constructor);
Value require_object_coercible(GlobalObject&, Value);
MarkedValueList create_list_from_array_like(GlobalObject&, Value, AK::Function<Result<void, ErrorType>(Value)> = {});