Skip to content

Commit 002d77a

Browse files
committed
[sending] Add a reported test case that we used to crash on that we no longer do so.
Just to validate we never break this code again. rdar://130114727
1 parent 69f0d2c commit 002d77a

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)