Closed omarzl closed 2 months ago
I wonder if this implementation would work well with the following code?🤔
Hello, I am only replacing the word some
to any
when the return type is some MyType
These other examples work well:
protocol Foo {
func register(router: () -> (Bar))
func register<T>(router: () -> (T))
}
protocol Bar {}
The generated mocks are:
var registerRouterHandler: ((() -> (Bar)) -> ())?
var registerRouterTHandler: ((() -> (Any)) -> ())?
oh right, sorry I misunderstood you I updated the fix and the tests to consider this scenario, thanks!
Sorry I forgot launch workflow.
The following code:
produces this mock:
causing the compilation error:
'some' cannot appear in parameter position in result type '((@autoclosure @escaping () -> (some Error)) -> ())?'
This pr fixes the variable
registerHandler
by generating the following mock: