File tree Expand file tree Collapse file tree 1 file changed +12
-10
lines changed Expand file tree Collapse file tree 1 file changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -114,17 +114,19 @@ Swift 4.1
114
114
recursive constraints. For example, the `SubSequence` associated type of
115
115
`Sequence` follows the enclosing protocol:
116
116
117
- protocol Sequence {
118
- associatedtype Element
119
- associatedtype SubSequence: Sequence
120
- where SubSequence.Element == Element,
121
- SubSequence.SubSequence == SubSequence
122
- // ...
123
- }
117
+ ``` swift
118
+ protocol Sequence {
119
+ associatedtype Element
120
+ associatedtype SubSequence : Sequence
121
+ where SubSequence .Element == Element ,
122
+ SubSequence .SubSequence == SubSequence
123
+ // ...
124
+ }
124
125
125
- protocol Collection: Sequence where Self.SubSequence: Collection {
126
- // ...
127
- }
126
+ protocol Collection : Sequence where Self .SubSequence : Collection {
127
+ // ...
128
+ }
129
+ ```
128
130
129
131
As a result, a number of new constraints have been introduced into the
130
132
standard library protocols:
You can’t perform that action at this time.
0 commit comments