@@ -4843,7 +4843,7 @@ static bool repairOutOfOrderArgumentsInBinaryFunction(
4843
4843
/// \return true if at least some of the failures has been repaired
4844
4844
/// successfully, which allows type matcher to continue.
4845
4845
bool ConstraintSystem::repairFailures(
4846
- Type lhs, Type rhs, ConstraintKind matchKind,
4846
+ Type lhs, Type rhs, ConstraintKind matchKind, TypeMatchOptions flags,
4847
4847
SmallVectorImpl<RestrictionOrFix> &conversionsOrFixes,
4848
4848
ConstraintLocatorBuilder locator) {
4849
4849
SmallVector<LocatorPathElt, 4> path;
@@ -5344,7 +5344,7 @@ bool ConstraintSystem::repairFailures(
5344
5344
// let's re-attempt to repair without l-value conversion in the
5345
5345
// locator to fix underlying type mismatch.
5346
5346
if (path.back().is<LocatorPathElt::FunctionResult>()) {
5347
- return repairFailures(lhs, rhs, matchKind, conversionsOrFixes,
5347
+ return repairFailures(lhs, rhs, matchKind, flags, conversionsOrFixes,
5348
5348
getConstraintLocator(anchor, path));
5349
5349
}
5350
5350
@@ -6133,7 +6133,7 @@ bool ConstraintSystem::repairFailures(
6133
6133
if (!path.empty() && path.back().is<LocatorPathElt::PackType>())
6134
6134
path.pop_back();
6135
6135
6136
- return repairFailures(lhs, rhs, matchKind, conversionsOrFixes,
6136
+ return repairFailures(lhs, rhs, matchKind, flags, conversionsOrFixes,
6137
6137
getConstraintLocator(anchor, path));
6138
6138
}
6139
6139
@@ -6377,7 +6377,7 @@ bool ConstraintSystem::repairFailures(
6377
6377
path.pop_back();
6378
6378
6379
6379
if (!path.empty() && path.back().is<LocatorPathElt::AnyRequirement>()) {
6380
- return repairFailures(lhs, rhs, matchKind, conversionsOrFixes,
6380
+ return repairFailures(lhs, rhs, matchKind, flags, conversionsOrFixes,
6381
6381
getConstraintLocator(anchor, path));
6382
6382
}
6383
6383
@@ -7479,7 +7479,8 @@ ConstraintSystem::matchTypes(Type type1, Type type2, ConstraintKind kind,
7479
7479
// Attempt fixes iff it's allowed, both types are concrete and
7480
7480
// we are not in the middle of attempting one already.
7481
7481
if (shouldAttemptFixes() && !flags.contains(TMF_ApplyingFix)) {
7482
- if (repairFailures(type1, type2, kind, conversionsOrFixes, locator)) {
7482
+ if (repairFailures(type1, type2, kind, flags, conversionsOrFixes,
7483
+ locator)) {
7483
7484
if (conversionsOrFixes.empty())
7484
7485
return getTypeMatchSuccess();
7485
7486
}
0 commit comments