Got this one reduced quite bit, but I'm not sure I got it all the way. Something about the combination of the isolated(any) closure and the sending genertic param results in a crash. But, to trigger the crash, you have to also call the function.
public final class MyClass {
public init() {
}
public func withBlock<T>(
_ block: @isolated(any) @escaping () async throws -> sending T
) async rethrows -> T {
}
}
let value = MyClass()
await value.withBlock {
}
Description
Got this one reduced quite bit, but I'm not sure I got it all the way. Something about the combination of the isolated(any) closure and the sending genertic param results in a crash. But, to trigger the crash, you have to also call the function.
Seems like the most relevant bit is:
Can't demangle: $s4test7MyClassC9withBlockyxxyYaKYAYTcYaKlF
Reproduction
Stack dump
Expected behavior
I'd expect this to produce an error about the lack of return within the
withBlock
function.Environment
Apple Swift version 6.0-dev (LLVM 961ea4ef750ef11, Swift dc553031a742cd6) Target: arm64-apple-macosx14.0
Additional information
No response