@@ -2232,8 +2232,8 @@ checkIndividualConformance(NormalProtocolConformance *conformance,
22322232 }
22332233
22342234 // 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 ()) {
22372237 auto nestedType = DC->getSelfNominalTypeDecl ()->getDeclaredInterfaceType ();
22382238 // Obj-C generics cannot be looked up at runtime, so we don't support
22392239 // conditional conformances involving them. Check the full stack of nested
@@ -2256,7 +2256,7 @@ checkIndividualConformance(NormalProtocolConformance *conformance,
22562256 // protocol, the conditional requirements must not involve conformance to a
22572257 // marker protocol. We cannot evaluate such a conformance at runtime.
22582258 if (!Proto->isMarkerProtocol ()) {
2259- for (const auto &req : * conditionalReqs) {
2259+ for (const auto &req : conditionalReqs) {
22602260 if (req.getKind () == RequirementKind::Conformance &&
22612261 req.getProtocolDecl ()->isMarkerProtocol ()) {
22622262 C.Diags .diagnose (
@@ -2318,9 +2318,8 @@ checkIndividualConformance(NormalProtocolConformance *conformance,
23182318 implyingConf = implyingConf->getImplyingConformance ();
23192319 }
23202320
2321- auto implyingCondReqs =
2322- implyingConf->getConditionalRequirementsIfAvailable ();
2323- if (implyingCondReqs && !implyingCondReqs->empty ()) {
2321+ auto implyingCondReqs = implyingConf->getConditionalRequirements ();
2322+ if (!implyingCondReqs.empty ()) {
23242323 // We shouldn't suggest including witnesses for the conformance, because
23252324 // those suggestions will go in the current DeclContext, but really they
23262325 // should go into the new extension we (might) suggest here.
0 commit comments