mirror of
https://github.com/luau-lang/luau.git
synced 2025-05-04 10:33:46 +01:00
Fix formatting
This commit is contained in:
parent
8a93a16738
commit
213515db3b
1 changed files with 4 additions and 2 deletions
|
@ -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}));
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue