@@ -654,16 +654,6 @@ NormalProtocolConformance *ModuleFile::readNormalConformance(
654
654
dc->getAsNominalTypeOrNominalTypeExtensionContext ()
655
655
->registerProtocolConformance (conformance);
656
656
657
- // Read requirement signature conformances.
658
- SmallVector<ProtocolConformanceRef, 4 > reqConformances;
659
- for (const auto &req : proto->getRequirementSignature ()) {
660
- if (req.getKind () == RequirementKind::Conformance) {
661
- auto reqConformance = readConformance (DeclTypeCursor);
662
- reqConformances.push_back (reqConformance);
663
- }
664
- }
665
- conformance->setSignatureConformances (reqConformances);
666
-
667
657
// If the conformance is complete, we're done.
668
658
if (conformance->isComplete ())
669
659
return conformance;
@@ -4594,13 +4584,16 @@ void ModuleFile::finishNormalConformance(NormalProtocolConformance *conformance,
4594
4584
typeCount,
4595
4585
rawIDs);
4596
4586
4597
- // Skip requirement signature conformances.
4598
- auto proto = conformance->getProtocol ();
4587
+ // Read requirement signature conformances.
4588
+ const ProtocolDecl *proto = conformance->getProtocol ();
4589
+ SmallVector<ProtocolConformanceRef, 4 > reqConformances;
4599
4590
for (const auto &req : proto->getRequirementSignature ()) {
4600
4591
if (req.getKind () == RequirementKind::Conformance) {
4601
- (void )readConformance (DeclTypeCursor);
4592
+ auto reqConformance = readConformance (DeclTypeCursor);
4593
+ reqConformances.push_back (reqConformance);
4602
4594
}
4603
4595
}
4596
+ conformance->setSignatureConformances (reqConformances);
4604
4597
4605
4598
ArrayRef<uint64_t >::iterator rawIDIter = rawIDs.begin ();
4606
4599
0 commit comments