mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user