Merge pull request #71709 from calda/cal--65921

[SE-0286] Fix issue where forward scanning default value heuristic wouldn't be applied in Swift 6 mode
This commit is contained in:
Holly Borla
2024-03-09 18:09:33 -08:00
committed by GitHub
3 changed files with 139 additions and 5 deletions

View File

@@ -563,8 +563,6 @@ static bool matchCallArgumentsImpl(
// backward-match rule that skips this parameter if doing so is the only
// way to successfully match arguments to parameters.
if (!parameterRequiresArgument(params, paramInfo, paramIdx) &&
!param.getPlainType()->getASTContext().LangOpts.hasFeature(
Feature::ForwardTrailingClosures) &&
anyParameterRequiresArgument(
params, paramInfo, paramIdx + 1,
nextArgIdx + 1 < numArgs