File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,30 @@ _**Note:** This is in reverse chronological order, so newer entries are added to
4
4
5
5
## Swift 5.9
6
6
7
+ * [ #64927 ] [ ] :
8
+
9
+ Swift 5.9 introduces warnings that catch conversions from an inout
10
+ argument in the caller to an ` UnsafeRawPointer ` in the callee
11
+ whenever the original type contains an object reference.
12
+
13
+ ``` swift
14
+ func inspectString (string : inout String ) {
15
+ readBytes (& string)
16
+ // warning: forming an 'UnsafeRawPointer' to an inout variable of type String
17
+ // exposes the internal representation rather than the string contents.
18
+ }
19
+ ```
20
+
21
+ ``` swift
22
+ func inspectData (data : inout Data) {
23
+ readBytes (& data)
24
+ // warning: forming an 'UnsafeRawPointer' to a variable of type 'T';
25
+ // this is likely incorrect because 'T' may contain an object reference.
26
+ }
27
+ ```
28
+
29
+ Please see the "Workarounds for common cases" section link in this github issue.
30
+
7
31
* [ SE-0366] [ ] :
8
32
9
33
The lifetime of a local variable value can be explicitly ended using the
@@ -9683,6 +9707,7 @@ using the `.dynamicType` member to retrieve the type of an expression should mig
9683
9707
[SE- 0376 ]: < https: // github.com/apple/swift-evolution/blob/main/proposals/0376-function-back-deployment.md>
9684
9708
[SE- 0377 ]: < https: // github.com/apple/swift-evolution/blob/main/proposals/0377-parameter-ownership-modifiers.md>
9685
9709
9710
+ [#64927 ]: < https: // github.com/apple/swift/issues/64927>
9686
9711
[#42697 ]: < https: // github.com/apple/swift/issues/42697>
9687
9712
[#42728 ]: < https: // github.com/apple/swift/issues/42728>
9688
9713
[#43036 ]: < https: // github.com/apple/swift/issues/43036>
You can’t perform that action at this time.
0 commit comments