From 5df3d261ff0f915d3ebaa737132639c5e18a5674 Mon Sep 17 00:00:00 2001 From: mtj0928 Date: Tue, 24 Sep 2024 22:11:11 +0900 Subject: [PATCH] Change macro --- .../AsyncOperations/Collections/withOrderedTaskGroup.swift | 4 ++-- .../Collections/withThrowingOrderedTaskGroup.swift | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Sources/AsyncOperations/Collections/withOrderedTaskGroup.swift b/Sources/AsyncOperations/Collections/withOrderedTaskGroup.swift index 40ee376..4a85cfb 100644 --- a/Sources/AsyncOperations/Collections/withOrderedTaskGroup.swift +++ b/Sources/AsyncOperations/Collections/withOrderedTaskGroup.swift @@ -1,4 +1,4 @@ -#if swift(>=6.0) +#if compiler(>=6.0) /// A wrapper function of `withTaskGroup`. /// /// The main difference with `withTaskGroup` is that the group's next function returns the results in the order the tasks were added. @@ -53,7 +53,7 @@ public struct OrderedTaskGroup { self.internalGroup = internalGroup } -#if swift(>=6.0) +#if compiler(>=6.0) public mutating func addTask( priority: TaskPriority? = nil, operation: sending @escaping @isolated(any) () async -> ChildTaskResult diff --git a/Sources/AsyncOperations/Collections/withThrowingOrderedTaskGroup.swift b/Sources/AsyncOperations/Collections/withThrowingOrderedTaskGroup.swift index 18234d2..16a952a 100644 --- a/Sources/AsyncOperations/Collections/withThrowingOrderedTaskGroup.swift +++ b/Sources/AsyncOperations/Collections/withThrowingOrderedTaskGroup.swift @@ -1,4 +1,4 @@ -#if swift(>=6.0) +#if compiler(>=6.0) /// A wrapper function of `withThrowingTaskGroup`. /// /// The main difference with `withThrowingTaskGroup` is that the group's next function returns the results in the order the tasks were added. @@ -50,7 +50,6 @@ public func withThrowingOrderedTaskGroup return try await body(&throwingOrderedTaskGroup) } } - #endif public struct ThrowingOrderedTaskGroup { @@ -63,7 +62,7 @@ public struct ThrowingOrderedTaskGroup=6.0) +#if compiler(>=6.0) public mutating func addTask( priority: TaskPriority? = nil, operation: sending @escaping @isolated(any) () async throws(Failure) -> ChildTaskResult