Skip to content

Commit 32feec7

Browse files
committed
Add a regression test for one of the crashes from https://bugs.swift.org/browse/SR-15792
1 parent 13c1352 commit 32feec7

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

test/Generics/sr15792_1.swift

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
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> {}

0 commit comments

Comments
 (0)