Skip to content

Commit 14e28ac

Browse files
committed
[NFC] Minor edits.
Fix indentation and tweak comments.
1 parent c4189f3 commit 14e28ac

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/Sema/CSSimplify.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4728,6 +4728,7 @@ ConstraintSystem::simplifyDynamicCallableApplicableFnConstraint(
47284728
auto loc = getConstraintLocator(locator);
47294729
auto tv = createTypeVariable(loc, TVO_CanBindToLValue);
47304730

4731+
// Record the 'dynamicallyCall` method overload set.
47314732
SmallVector<OverloadChoice, 4> choices;
47324733
for (auto candidate : candidates) {
47334734
TC.validateDecl(candidate);
@@ -4736,8 +4737,6 @@ ConstraintSystem::simplifyDynamicCallableApplicableFnConstraint(
47364737
OverloadChoice(type2, candidate, FunctionRefKind::SingleApply));
47374738
}
47384739
if (choices.empty()) return SolutionKind::Error;
4739-
4740-
// Record the 'dynamicallyCall` method overload set.
47414740
addOverloadSet(tv, choices, DC, loc);
47424741

47434742
// Create a type variable for the argument to the `dynamicallyCall` method.
@@ -4751,15 +4750,15 @@ ConstraintSystem::simplifyDynamicCallableApplicableFnConstraint(
47514750
Type argumentType;
47524751
if (!useKwargsMethod) {
47534752
auto arrayLitProto =
4754-
ctx.getProtocol(KnownProtocolKind::ExpressibleByArrayLiteral);
4753+
ctx.getProtocol(KnownProtocolKind::ExpressibleByArrayLiteral);
47554754
addConstraint(ConstraintKind::ConformsTo, tvParam,
47564755
arrayLitProto->getDeclaredType(), locator);
47574756
auto elementAssocType = cast<AssociatedTypeDecl>(
47584757
arrayLitProto->lookupDirect(ctx.Id_ArrayLiteralElement).front());
47594758
argumentType = DependentMemberType::get(tvParam, elementAssocType);
47604759
} else {
47614760
auto dictLitProto =
4762-
ctx.getProtocol(KnownProtocolKind::ExpressibleByDictionaryLiteral);
4761+
ctx.getProtocol(KnownProtocolKind::ExpressibleByDictionaryLiteral);
47634762
addConstraint(ConstraintKind::ConformsTo, tvParam,
47644763
dictLitProto->getDeclaredType(), locator);
47654764
auto valueAssocType = cast<AssociatedTypeDecl>(
@@ -4770,6 +4769,7 @@ ConstraintSystem::simplifyDynamicCallableApplicableFnConstraint(
47704769
// Argument type can default to `Any`.
47714770
addConstraint(ConstraintKind::Defaultable, argumentType,
47724771
ctx.TheAnyType, locator);
4772+
47734773
// All dynamic call parameter types must be convertible to the argument type.
47744774
for (auto i : indices(func1->getParams())) {
47754775
auto param = func1->getParams()[i];

0 commit comments

Comments
 (0)