File tree Expand file tree Collapse file tree 2 files changed +7
-10
lines changed Expand file tree Collapse file tree 2 files changed +7
-10
lines changed Original file line number Diff line number Diff line change 1
1
---
2
2
refs/heads/master: e052da7d8886fa0439677852e8f7830b20c2e1da
3
- refs/heads/master-next: 54a4615e6f9e5e723ee1a8f933e94e0a9d047248
3
+ refs/heads/master-next: c31b18490754add177d7509b945b0a2b66fe8ad3
4
4
refs/tags/osx-passed: b6b74147ef8a386f532cf9357a1bde006e552c54
5
5
refs/tags/swift-2.2-SNAPSHOT-2015-12-01-a: 6bb18e013c2284f2b45f5f84f2df2887dc0f7dea
6
6
refs/tags/swift-2.2-SNAPSHOT-2015-12-01-b: 66d897bfcf64a82cb9a87f5e663d889189d06d07
Original file line number Diff line number Diff line change @@ -63,19 +63,16 @@ Swift Next
63
63
extension Foo where Self : Bar {
64
64
var anotherProperty1: Int {
65
65
get { return someProperty }
66
- // 'someProperty' exists as a protocol requirement (implicitly mutating
67
- // due to the lack of a class constraint), so the setter below needs to
68
- // be explicitly marked as 'mutating'.
69
- set { someProperty = newValue } // Error
70
- }
71
-
72
- var anotherProperty2: Int {
73
- get { return someProperty }
74
- mutating set { someProperty = newValue } // Okay
66
+ // This will now error, because the protocol requirement
67
+ // is implicitly mutating and the setter is implicitly
68
+ // nonmutating.
69
+ set { someProperty = newValue }
75
70
}
76
71
}
77
72
```
78
73
74
+ To resolve this, explicitly mark the setter as ` nonmutating ` in the protocol.
75
+
79
76
* [ SE-0253] [ ] :
80
77
81
78
Values of types that declare ` func callAsFunction ` methods can be called
You can’t perform that action at this time.
0 commit comments