File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -37,17 +37,18 @@ void SILGenModule::useConformance(ProtocolConformanceRef conformanceRef) {
3737 if (auto *inherited = dyn_cast<InheritedProtocolConformance>(conformance))
3838 conformance = inherited->getInheritedConformance ();
3939
40+ // Emit any conformances implied by conditional requirements.
41+ if (auto *specialized = dyn_cast<SpecializedProtocolConformance>(conformance)) {
42+ useConformancesFromSubstitutions (specialized->getSubstitutionMap ());
43+ conformance = specialized->getGenericConformance ();
44+ }
45+
4046 // Get the normal conformance. If we don't have one, this is a self
4147 // conformance, which we can ignore.
42- auto normal = dyn_cast<NormalProtocolConformance>(
43- conformance->getRootConformance ());
48+ auto normal = dyn_cast<NormalProtocolConformance>(conformance);
4449 if (normal == nullptr )
4550 return ;
4651
47- // Emit any conformances implied by conditional requirements.
48- if (auto *specialized = dyn_cast<SpecializedProtocolConformance>(conformance))
49- useConformancesFromSubstitutions (specialized->getSubstitutionMap ());
50-
5152 // If this conformance was not synthesized by the ClangImporter, we're not
5253 // going to be emitting it lazily either, so we can avoid doing anything
5354 // below.
You can’t perform that action at this time.
0 commit comments