File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -1611,23 +1611,25 @@ void GenericSignature::verify(ArrayRef<Requirement> reqts) const {
16111611 break ;
16121612
16131613 case RequirementKind::SameType: {
1614- auto isCanonicalAnchor = [&](Type type) {
1615- if (auto *dmt = type->getAs <DependentMemberType>())
1616- return canSig->isCanonicalTypeInContext (dmt->getBase ());
1614+ auto hasCanonicalOrConcreteParent = [&](Type type) {
1615+ if (auto *dmt = type->getAs <DependentMemberType>()) {
1616+ return (canSig->isCanonicalTypeInContext (dmt->getBase ()) ||
1617+ canSig->isConcreteType (dmt->getBase ()));
1618+ }
16171619 return type->is <GenericTypeParamType>();
16181620 };
16191621
16201622 auto firstType = reqt.getFirstType ();
16211623 auto secondType = reqt.getSecondType ();
1622- if (!isCanonicalAnchor (firstType)) {
1624+ if (!hasCanonicalOrConcreteParent (firstType)) {
16231625 llvm::errs () << " Left hand side does not have a canonical parent: " ;
16241626 reqt.dump (llvm::errs ());
16251627 llvm::errs () << " \n " ;
16261628 abort ();
16271629 }
16281630
16291631 if (reqt.getSecondType ()->isTypeParameter ()) {
1630- if (!isCanonicalAnchor (secondType)) {
1632+ if (!hasCanonicalOrConcreteParent (secondType)) {
16311633 llvm::errs () << " Right hand side does not have a canonical parent: " ;
16321634 reqt.dump (llvm::errs ());
16331635 llvm::errs () << " \n " ;
You can’t perform that action at this time.
0 commit comments