@@ -1388,7 +1388,7 @@ void ASTMangler::appendRetroactiveConformances(Type type) {
1388
1388
module = Mod ? Mod : nominal->getModuleContext ();
1389
1389
subMap = type->getContextSubstitutionMap (module , nominal);
1390
1390
}
1391
-
1391
+
1392
1392
appendRetroactiveConformances (subMap, module );
1393
1393
}
1394
1394
@@ -2528,7 +2528,7 @@ ASTMangler::appendProtocolConformance(const ProtocolConformance *conformance) {
2528
2528
2529
2529
auto conformingType = conformance->getType ();
2530
2530
appendType (conformingType->getCanonicalType ());
2531
-
2531
+
2532
2532
appendProtocolName (conformance->getProtocol ());
2533
2533
2534
2534
bool needsModule = true ;
@@ -2649,6 +2649,10 @@ void ASTMangler::appendDependentProtocolConformance(
2649
2649
void ASTMangler::appendConcreteProtocolConformance (
2650
2650
const ProtocolConformance *conformance) {
2651
2651
auto module = conformance->getDeclContext ()->getParentModule ();
2652
+ if (!CurGenericSignature && conformance->getGenericSignature ()) {
2653
+ CurGenericSignature =
2654
+ conformance->getGenericSignature ()->getCanonicalSignature ();
2655
+ }
2652
2656
2653
2657
// Conforming type.
2654
2658
Type conformingType = conformance->getType ();
@@ -2679,7 +2683,7 @@ void ASTMangler::appendConcreteProtocolConformance(
2679
2683
assert (CurGenericSignature &&
2680
2684
" Need a generic signature to resolve conformance" );
2681
2685
auto conformanceAccessPath =
2682
- CurGenericSignature->getConformanceAccessPath (type, proto);
2686
+ CurGenericSignature->getConformanceAccessPath (type, proto);
2683
2687
appendDependentProtocolConformance (conformanceAccessPath);
2684
2688
} else if (auto opaqueType = canType->getAs <OpaqueTypeArchetypeType>()) {
2685
2689
GenericSignature opaqueSignature = opaqueType->getBoundSignature ();
0 commit comments