We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9dadbc0 commit acb0e9aCopy full SHA for acb0e9a
lib/Sema/TypeCheckProtocolInference.cpp
@@ -1497,8 +1497,10 @@ AssociatedTypeDecl *AssociatedTypeInference::inferAbstractTypeWitnesses(
1497
// If the transformed base has the same nominal as the adoptee, we may
1498
// need to look up a tentative type witness. Otherwise, just substitute
1499
// the base.
1500
- if (substBase->getAnyNominal() != adoptee->getAnyNominal()) {
1501
- return dmt->substBaseType(dc->getParentModule(), substBase);
+ if (substBase->getAnyNominal() != dc->getSelfNominalTypeDecl()) {
+ return dmt->substBaseType(substBase,
1502
+ LookUpConformanceInModule(dc->getParentModule()),
1503
+ substOptions);
1504
}
1505
1506
auto *assocTy = dmt->getAssocType();
0 commit comments