From d1e2c0c374415e9b87bba24daad6f6615ea5dad6 Mon Sep 17 00:00:00 2001 From: Anthony Latsis Date: Sat, 13 Feb 2021 19:32:35 +0300 Subject: [PATCH] Add CHANGELOG entry for #34140 --- CHANGELOG.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index fc5602a38d91a..8440ac21a4035 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,6 +28,20 @@ CHANGELOG Swift Next ---------- +* Whenever a reference to `Self` does not impede the usage of a protocol as a value type, or a protocol member on a value of protocol type, the same is now true for references to `[Self]` and `[Key : Self]`: + + ```swift + protocol Copyable { + func copy() -> Self + func copy(count: Int) -> [Self] + } + + func test(c: Copyable) { + let copy: Copyable = c.copy() // OK + let copies: [Copyable] = c.copy(count: 5) // also OK + } + ``` + * [SE-0296][]: Asynchronous programming is now natively supported using async/await. Asynchronous functions can be defined using `async`: