mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[CSSimplify] Variadics: Allow unlabeled matching after pack expansion argument
Remove a bit of logic from `matchCallArgumentsImpl` that prevented unlabeled argument matching after pack expansion argument until next labeled argument because it incorrectly assumed that it represents variadic forwarding.
This commit is contained in:
@@ -549,13 +549,6 @@ static bool matchCallArgumentsImpl(
|
||||
// Record the first argument for the variadic.
|
||||
parameterBindings[paramIdx].push_back(*claimed);
|
||||
|
||||
// If the argument is itself variadic, we're forwarding varargs
|
||||
// with a VarargExpansionExpr; don't collect any more arguments.
|
||||
if (args[*claimed].isVariadic() ||
|
||||
args[*claimed].getPlainType()->is<PackExpansionType>()) {
|
||||
return;
|
||||
}
|
||||
|
||||
auto currentNextArgIdx = nextArgIdx;
|
||||
{
|
||||
nextArgIdx = *claimed;
|
||||
|
||||
Reference in New Issue
Block a user