Skip to content

Commit 515f3ef

Browse files
committed
Document implementation of SE-0142
1 parent 90078b0 commit 515f3ef

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,21 @@ CHANGELOG
2121
Swift 4.0
2222
---------
2323

24+
* [SE-0142][]
25+
26+
Protocols and associated types can now contain `where` clauses that
27+
provide additional restrictions on associated types. For example:
28+
29+
```swift
30+
protocol StringRepresentable: RawRepresentable
31+
where RawValue == String { }
32+
33+
protocol RawStringWrapper {
34+
associatedtype Wrapped: RawRepresentable
35+
where Wrapper.RawValue == String
36+
}
37+
```
38+
2439
* [SE-0160][]
2540

2641
In Swift 4 mode, a declaration is inferred to be `@objc` where it is required for semantic consistency of the programming model. Specifically, it is inferred when:

0 commit comments

Comments
 (0)