Closed fwcd closed 2 years ago
Describe the bug The following program crashes the compiler:
class X { static func doStuff(continuation: @escaping (Self) -> Void) {} static func doStuff() async throws -> Self { try await withCheckedThrowingContinuation { continuation in doStuff { value in continuation.resume(returning: value) } } } }
Compiling throws the following stack trace (click below to expand):
Steps To Reproduce Steps to reproduce the behavior:
Expected behavior Not crashing.
Environment (please fill out the following information)
Additional context Note that the crash neither seems to occur if the closure is not @escaping nor if we use X instead of Self.
@escaping
X
Self
Duplicate of https://github.com/apple/swift/issues/56757
Good catch, so I think we can close this?
Describe the bug The following program crashes the compiler:
Compiling throws the following stack trace (click below to expand):
Steps To Reproduce Steps to reproduce the behavior:
Expected behavior Not crashing.
Environment (please fill out the following information)
Additional context Note that the crash neither seems to occur if the closure is not
@escaping
nor if we useX
instead ofSelf
.