When using @DependencyClient
macro, closures with mandatory return don't use the unimplemented version on tests
#183
Labels
apple bug
Something isn't working due to a bug on Apple's platforms.
Description
When using
@DependencyClient
macro in a client that has closures with mandatory returns, when using these closures in a test without overriding them we don't get errors about the method not being implemented.According to this message from Brandon this is related to a swift bug. Given that I'd suggest to at least add a note to the documentation mentioning that, instead of having a closure such as
{ _ in true }
, we unfortunately still have to use{ _ in unimplemented(placeholder: true) }
See also this Slack thread
Checklist
main
branch of this package.Expected behavior
The test shown should have 2 errors.
Actual behavior
The test only produces one error.
Steps to reproduce
Simple Client:
This test should have 2 failures but only shows one:
Dependencies version information
1.2.1
Destination operating system
iOS
Xcode version information
15.2
Swift Compiler version information
The text was updated successfully, but these errors were encountered: