Quick / Nimble

A Matcher Framework for Swift and Objective-C
https://quick.github.io/Nimble/documentation/nimble/
Apache License 2.0
4.81k stars 601 forks source link

Why not make waitUntil's done compatible with Sendable? #1158

Open soranoba opened 2 months ago

soranoba commented 2 months ago

What did you do?

await waitUntil { done in
    let blockOperation = BlockOperation {}
    blockOperation.completionBlock = {
        // Compile-error (Swift6): Assigning non-sendable parameter 'done' to a @Sendable closure
        done()
    }
    queue.addOperation(asyncOperation)
}

What did you expect to happen?

done compatible with Sendable

What actually happened instead?

done does not compatible with Sendable

Environment

List the software versions you're using:

Please also mention which package manager you used and its version. Delete the other package managers in this list:

Project that demonstrates the issue

None