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
+45Lines changed: 45 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,6 +5,29 @@ _**Note:** This is in reverse chronological order, so newer entries are added to
5
5
6
6
## Swift 5.7
7
7
8
+
* The compiler now correctly emits warnings for more kinds of expressions where a protocol conformance is used and may be unavailable at runtime. Previously, member reference expressions and type erasing expressions that used potentially unavailable conformances were not diagnosed, leading to potential crashes at runtime.
9
+
10
+
```swift
11
+
structPancake {}
12
+
protocolFood {}
13
+
14
+
extensionFood {
15
+
var isGlutenFree: Bool { false }
16
+
}
17
+
18
+
@available(macOS12.0, *)
19
+
extensionPancake: Food {}
20
+
21
+
@available(macOS11.0, *)
22
+
funceatPancake(_pancake: Pancake) {
23
+
if (pancake.isGlutenFree) { // warning: conformance of 'Pancake' to 'Food' is only available in macOS 12.0 or newer
24
+
eatFood(pancake) // warning: conformance of 'Pancake' to 'Food' is only available in macOS 12.0 or newer
25
+
}
26
+
}
27
+
28
+
funceatFood(_food: Food) {}
29
+
```
30
+
8
31
*[SE-0328][]:
9
32
10
33
Opaque types (expressed with 'some') can now be used in structural positions
@@ -19,6 +42,27 @@ _**Note:** This is in reverse chronological order, so newer entries are added to
19
42
Swift 5.6
20
43
---------
21
44
45
+
*[SE-0327][]:
46
+
47
+
In Swift 5 mode, a warning is now emitted if the default-value expression of an
48
+
instance-member property requires global-actor isolation. For example:
0 commit comments