[ConstraintSystem] Switch "missing conformance" fix/diagnostic to use protocol type

Switch type allows "missing conformance" diagnostic to be
used not only for protocols by for protocol compositions as well.
This commit is contained in:
Pavel Yaskevich
2019-05-10 13:47:52 -07:00
parent 2ee371b03a
commit a23bc3e189
5 changed files with 18 additions and 15 deletions

View File

@@ -3347,8 +3347,9 @@ ConstraintSystem::SolutionKind ConstraintSystem::simplifyConformsToConstraint(
return SolutionKind::Error;
}
auto *fix = MissingConformance::create(*this, type, protocol,
getConstraintLocator(locator));
auto *fix =
MissingConformance::create(*this, type, protocol->getDeclaredType(),
getConstraintLocator(locator));
if (!recordFix(fix))
return SolutionKind::Solved;
}