Skip to content

Commit 6b9dd23

Browse files
authored
[Changelog] Add SE-0268 to the changelog, under Swift 5.3 (#30903)
1 parent 4c4a55f commit 6b9dd23

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

CHANGELOG.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,25 @@ CHANGELOG
2727
Swift 5.3
2828
----------
2929

30+
* [SE-0268][]:
31+
32+
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`.
33+
34+
```swift
35+
class C {
36+
var value: Int = 0 {
37+
didSet { print("didSet called!") }
38+
}
39+
}
40+
41+
let c = C()
42+
// This does not trigger a call to the getter for 'value'
43+
// because the 'didSet' observer on 'value' does not
44+
// refer to the 'oldValue' in its body, which means
45+
// the 'oldValue' does not need to be fetched.
46+
c.value = 1
47+
```
48+
3049
* [SE-0276][]:
3150

3251
Catch clauses in a `do`-`catch` statement can now include multiple patterns in a comma-separated list. The body of a `catch` clause will be executed if a thrown error matches any of its patterns.
@@ -7982,6 +8001,7 @@ Swift 1.0
79828001
[SE-0254]: <https://github.com/apple/swift-evolution/blob/master/proposals/0254-static-subscripts.md>
79838002
[SE-0266]: <https://github.com/apple/swift-evolution/blob/master/proposals/0266-synthesized-comparable-for-enumerations.md>
79848003
[SE-0267]: <https://github.com/apple/swift-evolution/blob/master/proposals/0267-where-on-contextually-generic.md>
8004+
[SE-0268]: <https://github.com/apple/swift-evolution/blob/master/proposals/0268-didset-semantics.md>
79858005
[SE-0269]: <https://github.com/apple/swift-evolution/blob/master/proposals/0269-implicit-self-explicit-capture.md>
79868006
[SE-0276]: <https://github.com/apple/swift-evolution/blob/master/proposals/0276-multi-pattern-catch-clauses.md>
79878007
[SE-0280]: <https://github.com/apple/swift-evolution/blob/master/proposals/0280-enum-cases-as-protocol-witnesses.md>

0 commit comments

Comments
 (0)