Skip to content

Commit dec61de

Browse files
Update CHANGELOG for a recent source-breaking fix to 'findProtocolSelfReferences' (#39636)
1 parent 6d5e4b8 commit dec61de

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

CHANGELOG.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,28 @@ _**Note:** This is in reverse chronological order, so newer entries are added to
66
Swift 5.6
77
---------
88

9+
* References to `Self` or so-called "`Self` requirements" in the type signatures
10+
of protocol members are now correctly detected in the parent of a nested type.
11+
As a result, protocol members that fall under this overlooked case are no longer
12+
available on values of protocol type:
13+
14+
```swift
15+
struct Outer<T> {
16+
struct Inner {}
17+
}
18+
19+
protocol P {}
20+
extension P {
21+
func method(arg: Outer<Self>.Inner) {}
22+
}
23+
24+
func test(p: P) {
25+
// error: 'method' has a 'Self' requirement and cannot be used on a value of
26+
// protocol type (use a generic constraint instead).
27+
_ = p.method
28+
}
29+
```
30+
931
* [SE-0324][]:
1032

1133
Relax diagnostics for pointer arguments to C functions. The Swift

0 commit comments

Comments
 (0)