Skip to content

Commit c31b184

Browse files
committed
[Changelog] Update changelog
1 parent 54a4615 commit c31b184

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

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)