Skip to content

Commit b917697

Browse files
Update CHANGELOG.md
1 parent b42a1ac commit b917697

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

CHANGELOG.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,16 @@ Swift Next
3535
func boxes() -> [Box<Wrapped.Element>] where Wrapped: Sequence { ... }
3636
}
3737
```
38-
Because contextual `where` clauses are effectively visibility constraints, overrides adopting this feature must be at least as visible as the overridden method:
38+
Because contextual `where` clauses are effectively visibility constraints, overrides adopting this feature must be at least as visible as the overridden method. In practice this implies any instance of `Derived` that can access `Base.foo` must also be able to access `Derived.foo`.
3939

4040
```swift
4141
class Base<T> {
4242
func foo() where T == Int { ... }
4343
}
4444

45-
class Derived<T>: Base<T> {
46-
// OK, <T where T: Equatable> has broader visibility than <T where T == Int>
47-
override func foo() where T: Equatable { ... }
45+
class Derived<U>: Base<U> {
46+
// OK, <U where U: Equatable> has broader visibility than <T where T == Int>
47+
override func foo() where U: Equatable { ... }
4848
}
4949
```
5050

0 commit comments

Comments
 (0)