Skip to content

Commit 1ef521c

Browse files
committed
[Changelog] NFC: Add an entry about SE-0299
1 parent 75a9f4f commit 1ef521c

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
@@ -28,6 +28,26 @@ CHANGELOG
2828
Swift Next
2929
----------
3030

31+
* [SE-0299][]:
32+
33+
It is now possible to use leading-dot syntax in generic contexts to access static members of protocol extensions where `Self` is constrained to a fully concrete type:
34+
35+
```swift
36+
public protocol ToggleStyle { ... }
37+
38+
public struct DefaultToggleStyle: ToggleStyle { ... }
39+
40+
extension ToggleStyle where Self == DefaultToggleStyle {
41+
public static var `default`: Self { .init() }
42+
}
43+
44+
struct Toggle {
45+
func applyToggle<T: ToggleStyle>(_ style: T) { ... }
46+
}
47+
48+
Toggle(...).applyToggle(.default)
49+
```
50+
3151
* Whenever a reference to `Self` does not impede the usage of a protocol as a value type, or a protocol member on a value of protocol type, the same is now true for references to `[Self]` and `[Key : Self]`:
3252

3353
```swift

0 commit comments

Comments
 (0)