mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Merge pull request #41189 from xedin/trailing-closures-with-callAsFunction
[ConstraintSystem] Match trailing closures to implicit `.callAsFunction` when necessary
This commit is contained in:
@@ -2828,6 +2828,7 @@ void ConstraintSystem::bindOverloadType(
|
||||
if (!argList) {
|
||||
argList = ArgumentList::createImplicit(
|
||||
ctx, {Argument(SourceLoc(), ctx.Id_dynamicMember, /*expr*/ nullptr)},
|
||||
/*firstTrailingClosureIndex=*/None,
|
||||
AllocationArena::ConstraintSolver);
|
||||
}
|
||||
|
||||
@@ -3353,7 +3354,8 @@ size_t Solution::getTotalMemory() const {
|
||||
ConstraintRestrictions.getMemorySize() +
|
||||
llvm::capacity_in_bytes(Fixes) + DisjunctionChoices.getMemorySize() +
|
||||
OpenedTypes.getMemorySize() + OpenedExistentialTypes.getMemorySize() +
|
||||
(DefaultedConstraints.size() * sizeof(void *));
|
||||
(DefaultedConstraints.size() * sizeof(void *)) +
|
||||
ImplicitCallAsFunctionRoots.getMemorySize();
|
||||
}
|
||||
|
||||
DeclContext *Solution::getDC() const { return constraintSystem->DC; }
|
||||
|
||||
Reference in New Issue
Block a user