Skip to content

Commit 1ed7a68

Browse files
authored
Merge pull request #38157 from kylemacomber/5.5-never-identifiable
[5.5] Conform Never to Identifiable
2 parents f35042a + 6848840 commit 1ed7a68

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

stdlib/public/core/Policy.swift

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,13 @@ extension Never: Error {}
3434

3535
extension Never: Equatable, Comparable, Hashable {}
3636

37+
@available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *)
38+
extension Never: Identifiable {
39+
public var id: Never {
40+
switch self {}
41+
}
42+
}
43+
3744
//===----------------------------------------------------------------------===//
3845
// Standardized aliases
3946
//===----------------------------------------------------------------------===//

test/api-digester/stability-stdlib-abi-without-asserts.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,4 @@ Protocol CodingKey has added inherited protocol Sendable
5757
Protocol CodingKey has generic signature change from <Self : Swift.CustomDebugStringConvertible, Self : Swift.CustomStringConvertible> to <Self : Swift.CustomDebugStringConvertible, Self : Swift.CustomStringConvertible, Self : Swift.Sendable>
5858
Protocol Error has added inherited protocol Sendable
5959
Protocol Error has generic signature change from to <Self : Swift.Sendable>
60+
Enum Never has added a conformance to an existing protocol Identifiable

0 commit comments

Comments
 (0)