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

LibJS: Fix compilation of operator= for JS::SafeFunction

operator= for JS::SafeFunction was missing the CallableKind parameter
in the call to init_with_callable. This was not picked up before as
nothing used operator= on JS::SafeFunction.
This commit is contained in:
Luke Wilde 2023-02-28 19:55:11 +00:00 committed by Linus Groh
parent 80fad65e5b
commit 4bc0d8e4c8

View file

@ -88,7 +88,7 @@ public:
requires((AK::IsFunctionObject<CallableType> && IsCallableWithArguments<CallableType, Out, In...>)) requires((AK::IsFunctionObject<CallableType> && IsCallableWithArguments<CallableType, Out, In...>))
{ {
clear(); clear();
init_with_callable(forward<CallableType>(callable)); init_with_callable(forward<CallableType>(callable), CallableKind::FunctionObject);
return *this; return *this;
} }
@ -98,7 +98,7 @@ public:
{ {
clear(); clear();
if (f) if (f)
init_with_callable(move(f)); init_with_callable(move(f), CallableKind::FunctionPointer);
return *this; return *this;
} }