File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -1730,7 +1730,8 @@ class DeclChecker : public DeclVisitor<DeclChecker> {
1730
1730
auto mentionsItself =
1731
1731
defaultType.findIf ([&](Type defaultType) {
1732
1732
if (auto DMT = defaultType->getAs <DependentMemberType>()) {
1733
- return DMT->getAssocType () == AT;
1733
+ return (DMT->getAssocType () == AT &&
1734
+ DMT->getBase ()->isEqual (proto->getSelfInterfaceType ()));
1734
1735
}
1735
1736
return false ;
1736
1737
});
Original file line number Diff line number Diff line change @@ -34,3 +34,9 @@ protocol P4 {
34
34
}
35
35
36
36
struct X4 : P4 { } // expected-error{{type 'X4' does not conform to protocol 'P4'}}
37
+
38
+ // rdar://62355224 - circularity check for default type was over-eager
39
+ protocol Seq {
40
+ associatedtype SubSeq : Seq
41
+ associatedtype Index = SubSeq . Index
42
+ }
You can’t perform that action at this time.
0 commit comments