File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change 55
66## Swift 6.0
77
8+ * [ SE-0432] [ ] :
9+ Noncopyable enums can be pattern-matched with switches without consuming the
10+ value you switch over:
11+
12+ ``` swift
13+ enum Lunch : ~ Copyable {
14+ case soup
15+ case salad
16+ case sandwich
17+ }
18+
19+ func isSoup (_ lunch : borrowing Lunch) -> Bool {
20+ switch lunch {
21+ case .soup : true
22+ default : false
23+ }
24+ }
25+ ```
26+
27+
828* [ SE-0429] [ ] :
929 Certain types that contain noncopyable fields, such as those without a deinit,
1030 can now be consumed field-by-field:
@@ -10307,6 +10327,7 @@ using the `.dynamicType` member to retrieve the type of an expression should mig
1030710327[SE- 0422 ]: https: // github.com/apple/swift-evolution/blob/main/proposals/0422-caller-side-default-argument-macro-expression.md
1030810328[SE- 0427 ]: https: // github.com/apple/swift-evolution/blob/main/proposals/0427-noncopyable-generics.md
1030910329[SE- 0429 ]: https: // github.com/apple/swift-evolution/blob/main/proposals/0429-partial-consumption.md
10330+ [SE- 0432 ]: https: // github.com/apple/swift-evolution/blob/main/proposals/0432-noncopyable-switch.md
1031010331[#64927 ]: < https: // github.com/apple/swift/issues/64927>
1031110332[#42697 ]: < https: // github.com/apple/swift/issues/42697>
1031210333[#42728 ]: < https: // github.com/apple/swift/issues/42728>
You can’t perform that action at this time.
0 commit comments