Merge pull request #66080 from xedin/rdar-109586440

[ConstraintSystem] Some more variadic generic fixes
This commit is contained in:
Pavel Yaskevich
2023-05-24 14:49:09 -07:00
committed by GitHub
8 changed files with 74 additions and 8 deletions

View File

@@ -8356,6 +8356,13 @@ ConstraintSystem::SolutionKind ConstraintSystem::simplifyConformsToConstraint(
if (path.back().is<LocatorPathElt::PackElement>())
path.pop_back();
// This is similar to `PackElement` but locator points to the requirement
// associted with pack expansion pattern (i.e. `repeat each T: P`) where
// the path is something like:
// `... -> type req # -> pack expansion pattern`.
if (path.back().is<LocatorPathElt::PackExpansionPattern>())
path.pop_back();
if (auto req = path.back().getAs<LocatorPathElt::AnyRequirement>()) {
// If this is a requirement associated with `Self` which is bound
// to `Any`, let's consider this "too incorrect" to continue.