Skip to content

Commit 5b17b39

Browse files
Update CHANGELOG.md for #34005
1 parent 5dc969f commit 5b17b39

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

CHANGELOG.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,24 @@ CHANGELOG
2727
Swift Next
2828
----------
2929

30+
* [#34005][]:
31+
32+
Non-final classes are now allowed to satisfy read-only subscript and property requirements with a `Self` result type by following existing rules for implementing analogous *method* requirements.
33+
34+
```swift
35+
protocol P {
36+
func method() -> Self
37+
subscript() -> Self { get }
38+
var property: Self { get }
39+
}
40+
41+
class C: P {
42+
func method() -> Self { self }
43+
subscript() -> Self { self } // Now OK
44+
var property: Self { self } // Now OK
45+
}
46+
```
47+
3048
* [SE-0284][]:
3149

3250
Functions, subscripts, and initializers may now have more than one variadic parameter, as long as all parameters which follow variadic parameters are labeled. This makes declarations like the following valid:
@@ -8200,3 +8218,5 @@ Swift 1.0
82008218
[SR-11429]: <https://bugs.swift.org/browse/SR-11429>
82018219
[SR-11700]: <https://bugs.swift.org/browse/SR-11700>
82028220
[SR-11841]: <https://bugs.swift.org/browse/SR-11841>
8221+
8222+
[#34005]: <https://github.com/apple/swift/pull/34005>

0 commit comments

Comments
 (0)