From 692e63ff3e5b952e899ecd3e77ac93f758d944e4 Mon Sep 17 00:00:00 2001 From: Suyash Srijan Date: Thu, 9 Apr 2020 01:26:41 +0100 Subject: [PATCH] [Changelog] Add SE-0268 to the changelog, under Swift 5.3 --- CHANGELOG.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 43204b6899cbd..a07aac874f444 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,25 @@ CHANGELOG Swift 5.3 ---------- +* [SE-0268][]: + + A `didSet` observer which does not refer to the `oldValue` in its body or does not explicitly request it by placing it in the parameter list (i.e. `didSet(oldValue)`) will no longer trigger a call to the property getter to fetch the `oldValue`. + + ```swift + class C { + var value: Int = 0 { + didSet { print("didSet called!") } + } + } + + let c = C() + // This does not trigger a call to the getter for 'value' + // because the 'didSet' observer on 'value' does not + // refer to the 'oldValue' in its body, which means + // the 'oldValue' does not need to be fetched. + c.value = 1 + ``` + * [SE-0280][]: Enum cases can now satisfy static protocol requirements. A static get-only property of type `Self` can be witnessed by an enum case with no associated values and a static function with arguments and returning `Self` can be witnessed by an enum case with associated values. @@ -7969,6 +7988,7 @@ Swift 1.0 [SE-0254]: [SE-0266]: [SE-0267]: +[SE-0268]: [SE-0269]: [SE-0280]: