File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -5834,7 +5834,7 @@ void GenericSignatureBuilder::checkIfRequirementCanBeDerived(
5834
5834
}
5835
5835
5836
5836
static bool involvesNonSelfSubjectTypes (const RequirementSource *source) {
5837
- while (source->kind != RequirementSource::RequirementSignatureSelf) {
5837
+ while (source && source ->kind != RequirementSource::RequirementSignatureSelf) {
5838
5838
if (source->isProtocolRequirement () &&
5839
5839
!source->getStoredType ()->is <GenericTypeParamType>())
5840
5840
return true ;
Original file line number Diff line number Diff line change
1
+ // RUN: %target-typecheck-verify-swift %s
2
+
3
+ protocol Collection {
4
+ associatedtype SubSequence : Collection
5
+ }
6
+
7
+ protocol BidirectionalCollection : Collection where SubSequence: BidirectionalCollection { }
8
+
9
+ struct Slice < Base : Collection > : Collection {
10
+ typealias SubSequence = Slice < Base >
11
+ }
12
+
13
+ extension Slice : BidirectionalCollection where Base : BidirectionalCollection { }
14
+
15
+ protocol SlicedCollection : BidirectionalCollection where SubSequence == Slice < Self > { }
You can’t perform that action at this time.
0 commit comments