@@ -29,6 +29,43 @@ CHANGELOG
29
29
Swift 5.5
30
30
---------
31
31
32
+ * [ SR-14731] [ ] :
33
+
34
+ The compiler now correctly rejects the application of generic arguments to the
35
+ special ` Self ` type:
36
+
37
+ ``` swift
38
+ struct Box <T > {
39
+ // previously interpreted as a return type of Box<T>, ignoring the <Int> part;
40
+ // now we diagnose an error with a fix-it suggesting replacing `Self` with `Box`
41
+ static func makeBox () -> Self <Int > {... }
42
+ }```
43
+
44
+ * [SR- 14878 ][]:
45
+
46
+ The compiler now correctly rejects `@available ` annotations on enum cases with
47
+ associated values with an OS version newer than the current deployment target:
48
+
49
+ ```swift
50
+ @available(macOS 12, *)
51
+ public struct Crayon {}
52
+
53
+ public enum Pen {
54
+ case pencil
55
+
56
+ @available (macOS 12 , * )
57
+ case crayon (Crayon)
58
+ }
59
+ ```
60
+
61
+ While this worked with some examples, there is no way for the Swift runtime to
62
+ perform the requisite dynamic layout needed to support this in general, which
63
+ could cause crashes at runtime.
64
+
65
+ Note that conditional availability on stored properties in structs and classes
66
+ is not supported for similar reasons; it was already correctly detected and
67
+ diagnosed.
68
+
32
69
* [ SE-0316] [ ] :
33
70
34
71
A type can be defined as a global actor. Global actors extend the notion
@@ -8612,3 +8649,5 @@ Swift 1.0
8612
8649
[SR- 11429 ]: < https: // bugs.swift.org/browse/SR-11429>
8613
8650
[SR- 11700 ]: < https: // bugs.swift.org/browse/SR-11700>
8614
8651
[SR- 11841 ]: < https: // bugs.swift.org/browse/SR-11841>
8652
+ [SR- 14731 ]: < https: // bugs.swift.org/browse/SR-14731>
8653
+ [SR- 14878 ]: < https: // bugs.swift.org/browse/SR-14878>
0 commit comments