@@ -75,7 +75,6 @@ public func withDiscardingTaskGroup<GroupResult>(
75
75
isolation: isolated ( any Actor ) ? = #isolation,
76
76
body: ( inout DiscardingTaskGroup ) async -> GroupResult
77
77
) async -> GroupResult {
78
- #if compiler(>=5.5) && $BuiltinCreateTaskGroupWithFlags
79
78
let flags = taskGroupCreateFlags (
80
79
discardResults: true
81
80
)
@@ -89,9 +88,6 @@ public func withDiscardingTaskGroup<GroupResult>(
89
88
try ! await group. awaitAllRemainingTasks ( ) // try!-safe, cannot throw since this is a non throwing group
90
89
91
90
return result
92
- #else
93
- fatalError ( " Swift compiler is incompatible with this SDK version " )
94
- #endif
95
91
}
96
92
97
93
@available ( SwiftStdlib 5 . 9 , * )
@@ -102,7 +98,6 @@ internal func __abi_withDiscardingTaskGroup<GroupResult>(
102
98
returning returnType: GroupResult . Type = GroupResult . self,
103
99
body: ( inout DiscardingTaskGroup ) async -> GroupResult
104
100
) async -> GroupResult {
105
- #if compiler(>=5.5) && $BuiltinCreateTaskGroupWithFlags
106
101
let flags = taskGroupCreateFlags (
107
102
discardResults: true
108
103
)
@@ -116,9 +111,6 @@ internal func __abi_withDiscardingTaskGroup<GroupResult>(
116
111
try ! await group. awaitAllRemainingTasks ( ) // try!-safe, cannot throw since this is a non throwing group
117
112
118
113
return result
119
- #else
120
- fatalError ( " Swift compiler is incompatible with this SDK version " )
121
- #endif
122
114
}
123
115
124
116
/// A discarding group that contains dynamically created child tasks.
@@ -632,7 +624,6 @@ public func withThrowingDiscardingTaskGroup<GroupResult>(
632
624
isolation: isolated ( any Actor ) ? = #isolation,
633
625
body: ( inout ThrowingDiscardingTaskGroup < Error > ) async throws -> GroupResult
634
626
) async throws -> GroupResult {
635
- #if compiler(>=5.5) && $BuiltinCreateTaskGroupWithFlags
636
627
let flags = taskGroupCreateFlags (
637
628
discardResults: true
638
629
)
@@ -655,9 +646,6 @@ public func withThrowingDiscardingTaskGroup<GroupResult>(
655
646
try await group. awaitAllRemainingTasks ( bodyError: nil )
656
647
657
648
return result
658
- #else
659
- fatalError ( " Swift compiler is incompatible with this SDK version " )
660
- #endif
661
649
}
662
650
663
651
@available ( SwiftStdlib 5 . 9 , * )
@@ -668,7 +656,6 @@ internal func __abi_withThrowingDiscardingTaskGroup<GroupResult>(
668
656
returning returnType: GroupResult . Type = GroupResult . self,
669
657
body: ( inout ThrowingDiscardingTaskGroup < Error > ) async throws -> GroupResult
670
658
) async throws -> GroupResult {
671
- #if compiler(>=5.5) && $BuiltinCreateTaskGroupWithFlags
672
659
let flags = taskGroupCreateFlags (
673
660
discardResults: true
674
661
)
@@ -691,9 +678,6 @@ internal func __abi_withThrowingDiscardingTaskGroup<GroupResult>(
691
678
try await group. awaitAllRemainingTasks ( bodyError: nil )
692
679
693
680
return result
694
- #else
695
- fatalError ( " Swift compiler is incompatible with this SDK version " )
696
- #endif
697
681
}
698
682
699
683
0 commit comments