Merge pull request #27123 from hborla/missing-conformance-diag

[ConstraintSystem] Allow fixing missing conformance failures for `Void` and uninhabited types.
This commit is contained in:
Holly Borla
2019-09-12 17:41:19 -07:00
committed by GitHub
5 changed files with 14 additions and 14 deletions

View File

@@ -3901,11 +3901,6 @@ ConstraintSystem::SolutionKind ConstraintSystem::simplifyConformsToConstraint(
return recordFix(fix) ? SolutionKind::Error : SolutionKind::Solved;
}
// Let's not try to fix missing conformance for Void
// or Never because that doesn't really make sense.
if (type->isVoid() || type->isUninhabited())
return SolutionKind::Error;
if (path.back().is<LocatorPathElt::AnyRequirement>()) {
// If this is a requirement associated with `Self` which is bound
// to `Any`, let's consider this "too incorrect" to continue.