Skip to content

Commit 6a1e58a

Browse files
authored
Merge pull request #38103 from kylemacomber/never-identifiable
Conform Never to Identifiable
2 parents 32ca2fc + 98bdf35 commit 6a1e58a

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
@@ -70,5 +70,6 @@ Protocol CodingKey has added inherited protocol Sendable
7070
Protocol CodingKey has generic signature change from <Self : Swift.CustomDebugStringConvertible, Self : Swift.CustomStringConvertible> to <Self : Swift.CustomDebugStringConvertible, Self : Swift.CustomStringConvertible, Self : Swift.Sendable>
7171
Protocol Error has added inherited protocol Sendable
7272
Protocol Error has generic signature change from to <Self : Swift.Sendable>
73+
Enum Never has added a conformance to an existing protocol Identifiable
7374

7475
// *** DO NOT DISABLE OR XFAIL THIS TEST. *** (See comment above.)

0 commit comments

Comments
 (0)