@@ -170,11 +170,11 @@ struct SynthesizedExtensionAnalyzer::Implementation {
170
170
bool Unmergable;
171
171
unsigned InheritsCount;
172
172
std::set<Requirement> Requirements;
173
- void addRequirement (GenericSignature GenericSig, swift::Requirement Req) {
173
+ void addRequirement (swift::Requirement Req) {
174
174
auto First = Req.getFirstType ();
175
- auto CanFirst = GenericSig-> getCanonicalTypeInContext (First );
175
+ auto CanFirst = First-> getCanonicalType ( );
176
176
auto Second = Req.getSecondType ();
177
- auto CanSecond = GenericSig-> getCanonicalTypeInContext (Second );
177
+ auto CanSecond = Second-> getCanonicalType ( );
178
178
179
179
Requirements.insert ({First, Second, Req.getKind (), CanFirst, CanSecond});
180
180
}
@@ -284,7 +284,6 @@ struct SynthesizedExtensionAnalyzer::Implementation {
284
284
}
285
285
286
286
auto handleRequirements = [&](SubstitutionMap subMap,
287
- GenericSignature GenericSig,
288
287
ExtensionDecl *OwningExt,
289
288
ArrayRef<Requirement> Reqs) {
290
289
ProtocolDecl *BaseProto = OwningExt->getInnermostDeclContext ()
@@ -336,7 +335,7 @@ struct SynthesizedExtensionAnalyzer::Implementation {
336
335
if (!SubstReq->canBeSatisfied ())
337
336
return true ;
338
337
339
- MergeInfo.addRequirement (GenericSig, Req);
338
+ MergeInfo.addRequirement (Req);
340
339
}
341
340
}
342
341
return false ;
@@ -355,7 +354,7 @@ struct SynthesizedExtensionAnalyzer::Implementation {
355
354
356
355
assert (Ext->getGenericSignature () && " No generic signature." );
357
356
auto GenericSig = Ext->getGenericSignature ();
358
- if (handleRequirements (subMap, GenericSig, Ext, GenericSig->getRequirements ()))
357
+ if (handleRequirements (subMap, Ext, GenericSig->getRequirements ()))
359
358
return {Result, MergeInfo};
360
359
}
361
360
@@ -366,7 +365,6 @@ struct SynthesizedExtensionAnalyzer::Implementation {
366
365
subMap = BaseType->getContextSubstitutionMap (M, NTD);
367
366
}
368
367
if (handleRequirements (subMap,
369
- Conf->getGenericSignature (),
370
368
EnablingExt,
371
369
Conf->getConditionalRequirements ()))
372
370
return {Result, MergeInfo};
0 commit comments