@@ -4529,8 +4529,9 @@ lookupDynamicCallableMethods(Type type, ConstraintSystem &CS,
4529
4529
auto cand = cast<FuncDecl>(choice.getDecl ());
4530
4530
return !isValidDynamicCallableMethod (cand, decl, CS.TC , hasKeywordArgs);
4531
4531
};
4532
- candidates.erase (std::remove_if (candidates.begin (), candidates.end (), filter),
4533
- candidates.end ());
4532
+ candidates.erase (
4533
+ std::remove_if (candidates.begin (), candidates.end (), filter),
4534
+ candidates.end ());
4534
4535
4535
4536
llvm::DenseSet<FuncDecl *> methods;
4536
4537
for (auto candidate : candidates)
@@ -4539,8 +4540,8 @@ lookupDynamicCallableMethods(Type type, ConstraintSystem &CS,
4539
4540
}
4540
4541
4541
4542
// / Looks up and returns the @dynamicCallable required methods (if they exist)
4542
- // / implemented by a type. This function should not be called directly: instead,
4543
- // / call `getDynamicCallableMethods` which performs caching.
4543
+ // / implemented by a type. This function should not be called directly:
4544
+ // / instead, call `getDynamicCallableMethods` which performs caching.
4544
4545
static DynamicCallableMethods
4545
4546
lookupDynamicCallableMethods (Type type, ConstraintSystem &CS,
4546
4547
const ConstraintLocatorBuilder &locator) {
@@ -4550,13 +4551,14 @@ lookupDynamicCallableMethods(Type type, ConstraintSystem &CS,
4550
4551
lookupDynamicCallableMethods (type, CS, locator, ctx.Id_withArguments ,
4551
4552
/* hasKeywordArgs*/ false );
4552
4553
methods.keywordArgumentsMethods =
4553
- lookupDynamicCallableMethods (type, CS, locator, ctx.Id_withKeywordArguments ,
4554
+ lookupDynamicCallableMethods (type, CS, locator,
4555
+ ctx.Id_withKeywordArguments ,
4554
4556
/* hasKeywordArgs*/ true );
4555
4557
return methods;
4556
4558
}
4557
4559
4558
- // / Returns the @dynamicCallable required methods (if they exist) implemented by
4559
- // / a type.
4560
+ // / Returns the @dynamicCallable required methods (if they exist) implemented
4561
+ // / by a type.
4560
4562
// / This function may be slow for deep class hierarchies and multiple protocol
4561
4563
// / conformances, but it is invoked only after other constraint simplification
4562
4564
// / rules fail.
@@ -4640,10 +4642,10 @@ getDynamicCallableMethods(Type type, ConstraintSystem &CS,
4640
4642
4641
4643
ConstraintSystem::SolutionKind
4642
4644
ConstraintSystem::simplifyDynamicCallableApplicableFnConstraint (
4643
- Type type1,
4644
- Type type2,
4645
- TypeMatchOptions flags,
4646
- ConstraintLocatorBuilder locator) {
4645
+ Type type1,
4646
+ Type type2,
4647
+ TypeMatchOptions flags,
4648
+ ConstraintLocatorBuilder locator) {
4647
4649
auto &ctx = getASTContext ();
4648
4650
4649
4651
// By construction, the left hand side is a function type: $T1 -> $T2.
@@ -4675,8 +4677,9 @@ ConstraintSystem::simplifyDynamicCallableApplicableFnConstraint(
4675
4677
if (desugar2->isTypeVariableOrMember ())
4676
4678
return formUnsolved ();
4677
4679
4678
- // If right-hand side is a function type, it must be a valid `dynamicallyCall`
4679
- // method type. Bind the output and convert the argument to the input.
4680
+ // If right-hand side is a function type, it must be a valid
4681
+ // `dynamicallyCall` method type. Bind the output and convert the argument
4682
+ // to the input.
4680
4683
auto func1 = type1->castTo <FunctionType>();
4681
4684
if (auto func2 = dyn_cast<FunctionType>(desugar2)) {
4682
4685
// The argument type must be convertible to the input type.
0 commit comments