-
Notifications
You must be signed in to change notification settings - Fork 90
Description
New Issue Checklist
- I updated the framework and generator to the latest version
- I searched the existing GitHub issues and list of common problems
Overview
Cannot use closures and an argument captor at the same time. It forces me to use classes.
Example
I think the problem starts because i need to declare the type of a closure and at the same time use an argument captor to return a value. If i try that, Xcode cannot run the test and it shows an error. And if i see inside any(_:of:), it shows that i'm using the following function
| Test | any function |
|---|---|
![]() |
![]() |
But if i don't use the argument captor, the error in the test disappear and i see that any is referring another function
| Test | any function |
|---|---|
![]() |
![]() |
The only difference i see inside any functions is that in the first one it requires T to be AnyObject. So, i'm wondering if this is a bug. Or what is the way to declare the type of a closure and also use an argument captor?
Expected Behavior
It should let me run the test without showing an error.
Environment
- Mockingbird CLI version (
0.20.0) - Xcode and Swift version (
Xcode 15.0.1 | Swift 5.9 (swiftlang-5.9.0.128.108 clang-1500.0.40.1)) - Package manager (CocoaPods)
- Unit testing framework (XCTest)
- Custom configuration
- Mockingbird ignore files
- Supporting source files



