Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Sources/Lifecycle/Lifecycle.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
//
//===----------------------------------------------------------------------===//

#if compiler(>=5.5)
#if compiler(>=5.5) && canImport(_Concurrency)
import _Concurrency
#endif

Expand Down Expand Up @@ -99,7 +99,7 @@ public struct LifecycleHandler {
}
}

#if compiler(>=5.5)
#if compiler(>=5.5) && canImport(_Concurrency)
@available(macOS 12.0, *)
extension LifecycleHandler {
public init(_ handler: @escaping () async throws -> Void) {
Expand Down Expand Up @@ -163,7 +163,7 @@ public struct LifecycleStartHandler<State> {
}
}

#if compiler(>=5.5)
#if compiler(>=5.5) && canImport(_Concurrency)
@available(macOS 12.0, *)
extension LifecycleStartHandler {
public init(_ handler: @escaping () async throws -> State) {
Expand Down Expand Up @@ -225,7 +225,7 @@ public struct LifecycleShutdownHandler<State> {
}
}

#if compiler(>=5.5)
#if compiler(>=5.5) && canImport(_Concurrency)
@available(macOS 12.0, *)
extension LifecycleShutdownHandler {
public init(_ handler: @escaping (State) async throws -> Void) {
Expand Down
10 changes: 5 additions & 5 deletions Tests/LifecycleTests/ComponentLifecycleTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1401,7 +1401,7 @@ final class ComponentLifecycleTests: XCTestCase {
func testAsyncAwait() throws {
#if compiler(<5.2)
return
#elseif compiler(<5.5)
#elseif compiler(<5.5) || !canImport(_Concurrency)
throw XCTSkip()
#else
guard #available(macOS 12.0, *) else {
Expand Down Expand Up @@ -1435,7 +1435,7 @@ final class ComponentLifecycleTests: XCTestCase {
func testAsyncAwaitStateful() throws {
#if compiler(<5.2)
return
#elseif compiler(<5.5)
#elseif compiler(<5.5) || !canImport(_Concurrency)
throw XCTSkip()
#else
guard #available(macOS 12.0, *) else {
Expand Down Expand Up @@ -1473,7 +1473,7 @@ final class ComponentLifecycleTests: XCTestCase {
func testAsyncAwaitErrorOnStart() throws {
#if compiler(<5.2)
return
#elseif compiler(<5.5)
#elseif compiler(<5.5) || !canImport(_Concurrency)
throw XCTSkip()
#else
guard #available(macOS 12.0, *) else {
Expand Down Expand Up @@ -1509,7 +1509,7 @@ final class ComponentLifecycleTests: XCTestCase {
func testAsyncAwaitErrorOnStartShutdownRequested() throws {
#if compiler(<5.2)
return
#elseif compiler(<5.5)
#elseif compiler(<5.5) || !canImport(_Concurrency)
throw XCTSkip()
#else
guard #available(macOS 12.0, *) else {
Expand Down Expand Up @@ -1545,7 +1545,7 @@ final class ComponentLifecycleTests: XCTestCase {
func testAsyncAwaitErrorOnShutdown() throws {
#if compiler(<5.2)
return
#elseif compiler(<5.5)
#elseif compiler(<5.5) || !canImport(_Concurrency)
throw XCTSkip()
#else
guard #available(macOS 12.0, *) else {
Expand Down