mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Sema: Handle PackElement locator in repairFailures()
This commit is contained in:
@@ -5881,6 +5881,19 @@ bool ConstraintSystem::repairFailures(
|
||||
break;
|
||||
}
|
||||
|
||||
case ConstraintLocator::PackElement: {
|
||||
path.pop_back();
|
||||
|
||||
if (!path.empty() && path.back().is<LocatorPathElt::PackType>())
|
||||
path.pop_back();
|
||||
|
||||
if (!path.empty() && path.back().is<LocatorPathElt::PackType>())
|
||||
path.pop_back();
|
||||
|
||||
return repairFailures(lhs, rhs, matchKind, conversionsOrFixes,
|
||||
getConstraintLocator(anchor, path));
|
||||
}
|
||||
|
||||
case ConstraintLocator::SequenceElementType: {
|
||||
// This is going to be diagnosed as `missing conformance`,
|
||||
// so no need to create duplicate fixes.
|
||||
|
||||
Reference in New Issue
Block a user