Nimble icon indicating copy to clipboard operation
Nimble copied to clipboard

Build error when using toEventually

Open AnthonyMDev opened this issue 4 months ago • 4 comments

Version: Nimble 13.7.1

When using .toEventually() in an async test, I'm getting this error:

Non-sendable result type 'SyncExpectation<Bool>' cannot be sent from nonisolated context in call to instance method 'toEventually(_:timeout:pollInterval:description:)'

I get this from a statement as simple as: await expect(true).toEventually(beFalse()).

I'm not sure if this is a bug or I'm doing something wrong.

I can get past this by using @preconcurrency import Nimble for now, but it looks like SyncExpectation and probably AsyncExpectation should conform to Sendable to make this error go away.

AnthonyMDev avatar Sep 05 '25 20:09 AnthonyMDev