Skip to content

Commit 340c7f2

Browse files
gspiersGreg Spiers
authored andcommitted
Add SE-0186 to changelog.
1 parent f926ab5 commit 340c7f2

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,21 @@ CHANGELOG
2222
Swift 4.1
2323
---------
2424

25+
* [SE-0186][]
26+
27+
It is no longer valid to use the ownership keywords `weak` and `unowned` for property declarations in protocols. These keywords are meaningless and misleading when used in a protocol as they don't have any effect.
28+
29+
In Swift 3 and 4 mode the following example will produce a warning with a fix-it to remove the keyword. In Swift 5 mode and above an error will be produced.
30+
31+
```swift
32+
class A {}
33+
34+
protocol P {
35+
weak var weakVar: A? { get set }
36+
unowned var unownedVar: A { get set }
37+
}
38+
```
39+
2540
* [SE-0185][]
2641

2742
Structs and enums that declare a conformance to `Equatable`/`Hashable` now get an automatically synthesized implementation of `==`/`hashValue`. For structs, all stored properties must be `Equatable`/`Hashable`. For enums, all enum cases with associated values must be `Equatable`/`Hashable`.
@@ -6754,3 +6769,4 @@ Swift 1.0
67546769
[SE-0183]: <https://github.com/apple/swift-evolution/blob/master/proposals/0183-substring-affordances.md>
67556770
[SE-0184]: <https://github.com/apple/swift-evolution/blob/master/proposals/0184-unsafe-pointers-add-missing.md>
67566771
[SE-0185]: <https://github.com/apple/swift-evolution/blob/master/proposals/0185-synthesize-equatable-hashable.md>
6772+
[SE-0186]: <https://github.com/apple/swift-evolution/blob/master/proposals/0186-remove-ownership-keyword-support-in-protocols.md>

0 commit comments

Comments
 (0)