Skip to content

Commit b22c289

Browse files
authored
Merge pull request #38336 from slavapestov/changelog-update-5.5
Update CHANGELOG.md with a couple of correctness fixes [5.5]
2 parents d6dd670 + 71acf36 commit b22c289

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

CHANGELOG.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,43 @@ CHANGELOG
2929
Swift 5.5
3030
---------
3131

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+
3269
* [SE-0316][]:
3370

3471
A type can be defined as a global actor. Global actors extend the notion
@@ -8612,3 +8649,5 @@ Swift 1.0
86128649
[SR-11429]: <https://bugs.swift.org/browse/SR-11429>
86138650
[SR-11700]: <https://bugs.swift.org/browse/SR-11700>
86148651
[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

Comments
 (0)