Skip to content

Commit c30771e

Browse files
authored
Merge pull request #58 from zunda-pixel/fix-swift-6
support URLSession concurrency method in Swift 6(Linux, Windows)
2 parents 803ca5a + ae224e4 commit c30771e

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
.xcode
77
/*.xcodeproj
88
.xcode
9+
DerivedData
910

1011
.swiftpm/
1112
Package.resolved

Sources/HTTPTypesFoundation/URLSession+HTTPTypes.swift

+3-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ private enum HTTPTypeConversionError: Error {
4444

4545
#endif
4646

47-
#if os(macOS) || os(iOS) || os(watchOS) || os(tvOS) || os(visionOS)
47+
#if os(macOS) || os(iOS) || os(watchOS) || os(tvOS) || os(visionOS) || compiler(>=6)
4848

4949
@available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *)
5050
extension URLSession {
@@ -114,6 +114,7 @@ extension URLSession {
114114
return (location, response)
115115
}
116116

117+
#if os(macOS) || os(iOS) || os(watchOS) || os(tvOS) || os(visionOS)
117118
/// Returns a byte stream that conforms to AsyncSequence protocol.
118119
///
119120
/// - Parameter request: The `HTTPRequest` for which to load data.
@@ -129,6 +130,7 @@ extension URLSession {
129130
}
130131
return (data, response)
131132
}
133+
#endif
132134
}
133135

134136
@available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *)

0 commit comments

Comments
 (0)