@@ -2232,8 +2232,8 @@ checkIndividualConformance(NormalProtocolConformance *conformance,
2232
2232
}
2233
2233
2234
2234
// Not every protocol/type is compatible with conditional conformances.
2235
- auto conditionalReqs = conformance->getConditionalRequirementsIfAvailable ();
2236
- if (conditionalReqs && !conditionalReqs-> empty ()) {
2235
+ auto conditionalReqs = conformance->getConditionalRequirements ();
2236
+ if (!conditionalReqs. empty ()) {
2237
2237
auto nestedType = DC->getSelfNominalTypeDecl ()->getDeclaredInterfaceType ();
2238
2238
// Obj-C generics cannot be looked up at runtime, so we don't support
2239
2239
// conditional conformances involving them. Check the full stack of nested
@@ -2256,7 +2256,7 @@ checkIndividualConformance(NormalProtocolConformance *conformance,
2256
2256
// protocol, the conditional requirements must not involve conformance to a
2257
2257
// marker protocol. We cannot evaluate such a conformance at runtime.
2258
2258
if (!Proto->isMarkerProtocol ()) {
2259
- for (const auto &req : * conditionalReqs) {
2259
+ for (const auto &req : conditionalReqs) {
2260
2260
if (req.getKind () == RequirementKind::Conformance &&
2261
2261
req.getProtocolDecl ()->isMarkerProtocol ()) {
2262
2262
C.Diags .diagnose (
@@ -2318,9 +2318,8 @@ checkIndividualConformance(NormalProtocolConformance *conformance,
2318
2318
implyingConf = implyingConf->getImplyingConformance ();
2319
2319
}
2320
2320
2321
- auto implyingCondReqs =
2322
- implyingConf->getConditionalRequirementsIfAvailable ();
2323
- if (implyingCondReqs && !implyingCondReqs->empty ()) {
2321
+ auto implyingCondReqs = implyingConf->getConditionalRequirements ();
2322
+ if (!implyingCondReqs.empty ()) {
2324
2323
// We shouldn't suggest including witnesses for the conformance, because
2325
2324
// those suggestions will go in the current DeclContext, but really they
2326
2325
// should go into the new extension we (might) suggest here.
0 commit comments