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) {
37
37
if (auto *inherited = dyn_cast<InheritedProtocolConformance>(conformance))
38
38
conformance = inherited->getInheritedConformance ();
39
39
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
+
40
46
// Get the normal conformance. If we don't have one, this is a self
41
47
// conformance, which we can ignore.
42
- auto normal = dyn_cast<NormalProtocolConformance>(
43
- conformance->getRootConformance ());
48
+ auto normal = dyn_cast<NormalProtocolConformance>(conformance);
44
49
if (normal == nullptr )
45
50
return ;
46
51
47
- // Emit any conformances implied by conditional requirements.
48
- if (auto *specialized = dyn_cast<SpecializedProtocolConformance>(conformance))
49
- useConformancesFromSubstitutions (specialized->getSubstitutionMap ());
50
-
51
52
// If this conformance was not synthesized by the ClangImporter, we're not
52
53
// going to be emitting it lazily either, so we can avoid doing anything
53
54
// below.
You can’t perform that action at this time.
0 commit comments