You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+20Lines changed: 20 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -27,6 +27,25 @@ CHANGELOG
27
27
Swift 5.3
28
28
----------
29
29
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
+
classC {
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
+
30
49
*[SE-0276][]:
31
50
32
51
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.
0 commit comments