Skip to content

Commit 3f23d57

Browse files
committed
---
yaml --- r: 326095 b: refs/heads/master-next c: c31b184 h: refs/heads/master i: 326093: 6288b0f 326091: 2034adc 326087: 5c584c3 326079: cc3f99c
1 parent 49bb1c3 commit 3f23d57

File tree

2 files changed

+7
-10
lines changed

2 files changed

+7
-10
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
refs/heads/master: e052da7d8886fa0439677852e8f7830b20c2e1da
3-
refs/heads/master-next: 54a4615e6f9e5e723ee1a8f933e94e0a9d047248
3+
refs/heads/master-next: c31b18490754add177d7509b945b0a2b66fe8ad3
44
refs/tags/osx-passed: b6b74147ef8a386f532cf9357a1bde006e552c54
55
refs/tags/swift-2.2-SNAPSHOT-2015-12-01-a: 6bb18e013c2284f2b45f5f84f2df2887dc0f7dea
66
refs/tags/swift-2.2-SNAPSHOT-2015-12-01-b: 66d897bfcf64a82cb9a87f5e663d889189d06d07

branches/master-next/CHANGELOG.md

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -63,19 +63,16 @@ Swift Next
6363
extension Foo where Self: Bar {
6464
var anotherProperty1: Int {
6565
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 }
7570
}
7671
}
7772
```
7873

74+
To resolve this, explicitly mark the setter as `nonmutating` in the protocol.
75+
7976
* [SE-0253][]:
8077

8178
Values of types that declare `func callAsFunction` methods can be called

0 commit comments

Comments
 (0)