Skip to content

Commit 47b1ad8

Browse files
committed
DispatchTimeInterval: fixed Xcode 14.3 compilation
I expected it to be marked `Sendable` in the next version of Swift, but it still hasn't so I filed https://github.com/apple/swift/issues/65044. `DispatchTimeInterval` is a value type, so it's safe to do this. I don't want to remove the `#if swift` version check because I expect it to be marked `Sendable` in a future version.
1 parent 398293d commit 47b1ad8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Sources/FoundationExtensions/DispatchTimeInterval+Extensions.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,9 @@ extension DispatchTimeInterval: Comparable {
101101

102102
}
103103

104-
#if swift(<5.8)
105-
// `DispatchTimeInterval` is not `Sendable` as of Swift 5.7.
104+
#if swift(<5.9)
105+
// `DispatchTimeInterval` is not `Sendable` as of Swift 5.8.
106106
// Its conformance is safe since it only represents data
107+
// See https://github.com/apple/swift/issues/65044
107108
extension DispatchTimeInterval: @unchecked Sendable {}
108109
#endif

0 commit comments

Comments
 (0)