We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
it will crash on iOS11/12 because of this code:
version: 6.18.0 #if swift(>=5.5) @available(iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, *) public extension Guarantee { func async() async -> T { await withCheckedContinuation { continuation in done { value in continuation.resume(returning: value) } } } }
@available(iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, *) public extension Promise { func async() async throws -> T { try await withCheckedThrowingContinuation { continuation in done { value in continuation.resume(returning: value) }.catch { error in continuation.resume(throwing: error) } } } } #endif
The text was updated successfully, but these errors were encountered:
verson: 6.18.1 Xcode: 13.2
it will crash too!! on iOS11/12...
#if swift(>=5.5) #if canImport(_Concurrency) @available(iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, *) public extension Guarantee { func async() async -> T { await withCheckedContinuation { continuation in done { value in continuation.resume(returning: value) } } } }
@available(iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, *) public extension Promise { func async() async throws -> T { try await withCheckedThrowingContinuation { continuation in done { value in continuation.resume(returning: value) }.catch { error in continuation.resume(throwing: error) } } } } #endif #endif
Sorry, something went wrong.
Hello @zzzzzyijie Please provide more details.
What does the crash say? Something generic like EXC_BAD_ACCESS or something more specific?
No branches or pull requests
it will crash on iOS11/12
because of this code:
version: 6.18.0
#if swift(>=5.5)
@available(iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, *)
public extension Guarantee {
func async() async -> T {
await withCheckedContinuation { continuation in
done { value in
continuation.resume(returning: value)
}
}
}
}
@available(iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, *)
public extension Promise {
func async() async throws -> T {
try await withCheckedThrowingContinuation { continuation in
done { value in
continuation.resume(returning: value)
}.catch { error in
continuation.resume(throwing: error)
}
}
}
}
#endif
The text was updated successfully, but these errors were encountered: