Skip to content

Commit 53496b6

Browse files
authored
Merge pull request swiftlang#74976 from gottesmm/pr-66fd64dc294801d5f5bcbff42ea74ce1f3baa52e
[sending] Add a reported test case that we used to crash on that we no longer do so.
2 parents 3961729 + 002d77a commit 53496b6

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

test/Concurrency/sending_continuation.swift

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,3 +231,16 @@ func withUnsafeContinuation_4a() async {
231231
}
232232
await useValueAsync(x)
233233
}
234+
235+
public actor WithCheckedThrowingContinuationErrorAvoidance {
236+
nonisolated func handle(reply: (Int) -> Void) {}
237+
238+
// make sure that we do not emit any errors on the following code.
239+
func noError() async throws -> Int {
240+
return try await withCheckedThrowingContinuation { continuation in
241+
handle { result in
242+
continuation.resume(returning: result)
243+
}
244+
}
245+
}
246+
}

0 commit comments

Comments
 (0)