Fix formatting

This commit is contained in:
JohnnyMorganz 2022-11-28 11:18:00 +00:00
parent 8a93a16738
commit 213515db3b

View file

@ -4141,12 +4141,14 @@ std::optional<WithPredicate<TypePackId>> TypeChecker::checkCallOverload(const Sc
if (const MetatableTypeVar* mttv = get<MetatableTypeVar>(fn)) if (const MetatableTypeVar* mttv = get<MetatableTypeVar>(fn))
{ {
callTy = getIndexTypeFromType(scope, mttv->metatable, "__call", expr.func->location, /* addErrors= */ false); callTy = getIndexTypeFromType(scope, mttv->metatable, "__call", expr.func->location, /* addErrors= */ false);
} else if (const ClassTypeVar* ctv = get<ClassTypeVar>(fn); FFlag::LuauCallableClasses && ctv && ctv->metatable) }
else if (const ClassTypeVar* ctv = get<ClassTypeVar>(fn); FFlag::LuauCallableClasses && ctv && ctv->metatable)
{ {
callTy = getIndexTypeFromType(scope, *ctv->metatable, "__call", expr.func->location, /* addErrors= */ false); callTy = getIndexTypeFromType(scope, *ctv->metatable, "__call", expr.func->location, /* addErrors= */ false);
} }
if (callTy) { if (callTy)
{
// Construct arguments with 'self' added in front // Construct arguments with 'self' added in front
TypePackId metaCallArgPack = addTypePack(TypePackVar(TypePack{args->head, args->tail})); TypePackId metaCallArgPack = addTypePack(TypePackVar(TypePack{args->head, args->tail}));