Skip to content

Commit 14c6155

Browse files
committed
use claim for trailing closure
1 parent f142eed commit 14c6155

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/Sema/CSSimplify.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -476,8 +476,8 @@ matchCallArguments(SmallVectorImpl<AnyFunctionType::Param> &args,
476476
}
477477

478478
// Claim the parameter/argument pair.
479-
claimedArgs[numArgs-1] = true;
480-
++numClaimedArgs;
479+
claim(params[lastParamIdx].getLabel(), numArgs - 1,
480+
/*ignoreNameClash=*/true);
481481
// Let's claim the trailing closure unless it's an extra argument.
482482
if (!isExtraClosure)
483483
parameterBindings[lastParamIdx].push_back(numArgs - 1);

0 commit comments

Comments
 (0)