@@ -26,27 +26,24 @@ CHANGELOG
26
26
Swift Next
27
27
----------
28
28
29
- * [ SR-8974 ] [ ] :
29
+ * [ SR-4206 ] [ ] :
30
30
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:
33
33
34
34
```
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
+ }
39
44
```
40
45
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.
50
47
51
48
* [ SR-6118] [ ] :
52
49
@@ -68,6 +65,28 @@ Swift Next
68
65
Swift 5.1
69
66
---------
70
67
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
+
71
90
* [ SE-0244] [ ] :
72
91
73
92
Functions can now hide their concrete return type by declaring what protocols
@@ -7708,6 +7727,7 @@ Swift 1.0
7708
7727
[SR- 2608 ]: < https: // bugs.swift.org/browse/SR-2608>
7709
7728
[SR- 2672 ]: < https: // bugs.swift.org/browse/SR-2672>
7710
7729
[SR- 2688 ]: < https: // bugs.swift.org/browse/SR-2688>
7730
+ [SR- 4206 ]: < https: // bugs.swift.org/browse/SR-4206>
7711
7731
[SR- 4248 ]: < https: // bugs.swift.org/browse/SR-4248>
7712
7732
[SR- 5581 ]: < https: // bugs.swift.org/browse/SR-5581>
7713
7733
[SR- 5719 ]: < https: // bugs.swift.org/browse/SR-5719>
0 commit comments