File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -327,13 +327,12 @@ struct SynthesizedExtensionAnalyzer::Implementation {
327
327
auto handleRequirements = [&](ExtensionDecl *OwningExt,
328
328
ArrayRef<Requirement> Reqs) {
329
329
ProtocolDecl *BaseProto = OwningExt->getSelfProtocolDecl ();
330
- // Get the substitutions from the generic signature of
331
- // the extension to the interface types of the base type's
332
- // declaration.
330
+ // Substitute the base conforming type into a protocol's generic signature
331
+ // if needed.
333
332
SubstitutionMap subMap;
334
- if (!BaseType->is <ProtocolType>()) {
335
- if ( auto *NTD = OwningExt-> getExtendedNominal ())
336
- subMap = BaseType-> getContextSubstitutionMap (NTD );
333
+ if (!BaseType->is <ProtocolType>() && BaseProto ) {
334
+ subMap = SubstitutionMap::get (BaseProto-> getGenericSignature (),
335
+ { BaseType}, LookUpConformanceInModule () );
337
336
}
338
337
for (auto Req : Reqs) {
339
338
// Skip protocol's Self : <Protocol> requirement.
You can’t perform that action at this time.
0 commit comments