Skip to content

Commit c414fdc

Browse files
authored
Merge pull request #26170 from theblixguy/chore/update-changelog-1
2 parents e597b95 + d0d2631 commit c414fdc

File tree

1 file changed

+36
-16
lines changed

1 file changed

+36
-16
lines changed

CHANGELOG.md

Lines changed: 36 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -26,27 +26,24 @@ CHANGELOG
2626
Swift Next
2727
----------
2828

29-
* [SR-8974][]:
29+
* [SR-4206][]:
3030

31-
Duplicate tuple element labels are no longer allowed, because it leads
32-
to incorrect behavior. For example:
31+
A method override is no longer allowed to have a generic signature with
32+
requirements not imposed by the base method. For example:
3333

3434
```
35-
let dupLabels: (foo: Int, foo: Int) = (foo: 1, foo: 2)
36-
37-
enum Foo { case bar(x: Int, x: Int) }
38-
let f: Foo = .bar(x: 0, x: 1)
35+
protocol P {}
36+
37+
class Base {
38+
func foo<T>(arg: T) {}
39+
}
40+
41+
class Derived: Base {
42+
override func foo<T: P>(arg: T) {}
43+
}
3944
```
4045

41-
will now be diagnosed as an error.
42-
43-
Note: You can still use duplicate labels when declaring functions and
44-
subscripts, as long as the internal labels are different. For example:
45-
46-
```
47-
func foo(bar x: Int, bar y: Int) {}
48-
subscript(a x: Int, a y: Int) -> Int {}
49-
```
46+
will now be diagnosed as an error.
5047

5148
* [SR-6118][]:
5249

@@ -68,6 +65,28 @@ Swift Next
6865
Swift 5.1
6966
---------
7067

68+
* [SR-8974][]:
69+
70+
Duplicate tuple element labels are no longer allowed, because it leads
71+
to incorrect behavior. For example:
72+
73+
```
74+
let dupLabels: (foo: Int, foo: Int) = (foo: 1, foo: 2)
75+
76+
enum Foo { case bar(x: Int, x: Int) }
77+
let f: Foo = .bar(x: 0, x: 1)
78+
```
79+
80+
will now be diagnosed as an error.
81+
82+
Note: You can still use duplicate argument labels when declaring functions and
83+
subscripts, as long as the internal parameter names are different. For example:
84+
85+
```
86+
func foo(bar x: Int, bar y: Int) {}
87+
subscript(a x: Int, a y: Int) -> Int {}
88+
```
89+
7190
* [SE-0244][]:
7291

7392
Functions can now hide their concrete return type by declaring what protocols
@@ -7708,6 +7727,7 @@ Swift 1.0
77087727
[SR-2608]: <https://bugs.swift.org/browse/SR-2608>
77097728
[SR-2672]: <https://bugs.swift.org/browse/SR-2672>
77107729
[SR-2688]: <https://bugs.swift.org/browse/SR-2688>
7730+
[SR-4206]: <https://bugs.swift.org/browse/SR-4206>
77117731
[SR-4248]: <https://bugs.swift.org/browse/SR-4248>
77127732
[SR-5581]: <https://bugs.swift.org/browse/SR-5581>
77137733
[SR-5719]: <https://bugs.swift.org/browse/SR-5719>

0 commit comments

Comments
 (0)