File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -390,9 +390,15 @@ GenericSignature::getSubstitutionMap(SubstitutionList subs) const {
390
390
if (auto paramTy = dyn_cast<GenericTypeParamType>(canTy))
391
391
result.addSubstitution (paramTy,
392
392
sub.getReplacement ());
393
- assert (reqts.size () == sub.getConformances ().size ());
394
- for (auto conformance : sub.getConformances ())
395
- result.addConformance (canTy, conformance);
393
+
394
+ auto conformances = sub.getConformances ();
395
+ assert (reqts.size () == conformances.size ());
396
+
397
+ for (unsigned i = 0 , e = conformances.size (); i < e; i++) {
398
+ assert (reqts[i].getSecondType ()->getAnyNominal () ==
399
+ conformances[i].getRequirement ());
400
+ result.addConformance (canTy, conformances[i]);
401
+ }
396
402
397
403
return false ;
398
404
});
You can’t perform that action at this time.
0 commit comments