Skip to content

Commit a146af9

Browse files
authored
Restore key path debug description in 5.9 (#95)
1 parent 3a35f78 commit a146af9

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

Sources/CustomDump/Conformances/KeyPath.swift

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,12 @@ import Foundation
22

33
extension AnyKeyPath: CustomDumpStringConvertible {
44
public var customDumpDescription: String {
5-
// NB: We can't currently rely on SE-0369 due to this crasher:
6-
// https://github.com/apple/swift/issues/64865
7-
//
8-
// #if swift(>=5.8)
9-
// if #available(macOS 13.3, iOS 16.4, watchOS 9.4, tvOS 16.4, *) {
10-
// return self.debugDescription
11-
// }
12-
// #endif
5+
// NB: We gate this to 5.9+ due to this crasher: https://github.com/apple/swift/issues/64865
6+
#if swift(>=5.9)
7+
if #available(macOS 13.3, iOS 16.4, watchOS 9.4, tvOS 16.4, *) {
8+
return self.debugDescription
9+
}
10+
#endif
1311
#if os(iOS) || os(macOS) || os(tvOS) || os(watchOS)
1412
keyPathToNameLock.lock()
1513
defer { keyPathToNameLock.unlock() }

0 commit comments

Comments
 (0)