mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
use claim for trailing closure
This commit is contained in:
@@ -476,8 +476,8 @@ matchCallArguments(SmallVectorImpl<AnyFunctionType::Param> &args,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Claim the parameter/argument pair.
|
// Claim the parameter/argument pair.
|
||||||
claimedArgs[numArgs-1] = true;
|
claim(params[lastParamIdx].getLabel(), numArgs - 1,
|
||||||
++numClaimedArgs;
|
/*ignoreNameClash=*/true);
|
||||||
// Let's claim the trailing closure unless it's an extra argument.
|
// Let's claim the trailing closure unless it's an extra argument.
|
||||||
if (!isExtraClosure)
|
if (!isExtraClosure)
|
||||||
parameterBindings[lastParamIdx].push_back(numArgs - 1);
|
parameterBindings[lastParamIdx].push_back(numArgs - 1);
|
||||||
|
|||||||
Reference in New Issue
Block a user