Skip to content

Commit ae0a594

Browse files
mbrandonwmluisbrown
authored andcommitted
Fix for Xcode 14 RC (#1351)
* Fix for Xcode 14 RC * wip (cherry picked from commit f0a6250e607f1e14ada393e7df252a016c7143fe)
1 parent ba3613f commit ae0a594

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

Sources/ComposableArchitecture/TestStore.swift

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,9 @@
274274
)
275275
}
276276

277-
#if swift(>=5.7)
277+
// NB: Only needed until Xcode ships a macOS SDK that uses the 5.7 standard library.
278+
// See: https://forums.swift.org/t/xcode-14-rc-cannot-specialize-protocol-type/60171/15
279+
#if swift(>=5.7) && !os(macOS) && !targetEnvironment(macCatalyst)
278280
/// Suspends until all in-flight effects have finished, or until it times out.
279281
///
280282
/// Can be used to assert that all effects have finished.
@@ -758,7 +760,9 @@
758760
}
759761
}
760762

761-
#if swift(>=5.7)
763+
// NB: Only needed until Xcode ships a macOS SDK that uses the 5.7 standard library.
764+
// See: https://forums.swift.org/t/xcode-14-rc-cannot-specialize-protocol-type/60171/15
765+
#if swift(>=5.7) && !os(macOS) && !targetEnvironment(macCatalyst)
762766
/// Asserts an action was received from an effect and asserts how the state changes.
763767
///
764768
/// - Parameters:
@@ -945,7 +949,9 @@
945949
await self.rawValue?.cancellableValue
946950
}
947951

948-
#if swift(>=5.7)
952+
// NB: Only needed until Xcode ships a macOS SDK that uses the 5.7 standard library.
953+
// See: https://forums.swift.org/t/xcode-14-rc-cannot-specialize-protocol-type/60171/15
954+
#if swift(>=5.7) && !os(macOS) && !targetEnvironment(macCatalyst)
949955
/// Asserts the underlying task finished.
950956
///
951957
/// - Parameter duration: The amount of time to wait before asserting.
@@ -1025,7 +1031,9 @@
10251031
}
10261032
}
10271033

1028-
#if swift(>=5.7)
1034+
// NB: Only needed until Xcode ships a macOS SDK that uses the 5.7 standard library.
1035+
// See: https://forums.swift.org/t/xcode-14-rc-cannot-specialize-protocol-type/60171/15
1036+
#if swift(>=5.7) && !os(macOS) && !targetEnvironment(macCatalyst)
10291037
@available(iOS 16, macOS 13, tvOS 16, watchOS 9, *)
10301038
extension Duration {
10311039
fileprivate var nanoseconds: UInt64 {

0 commit comments

Comments
 (0)