Framework for automatic mock generation. Adds a set of handy methods, simplifying testing. One of the best and most complete solutions, including generics support and much more.
MIT License
1.03k
stars
104
forks
source link
Invalid redeclaration error in .generated file while using tuples with typealias #342
We are currently using version 4.0.4 of SwiftyMocky without any issues. However, when we try to update to version 4.1.0, we encounter an issue where one of our protocol functions is generated with a duplicate function. I have identified that this issue is related to the return type of the function.
I have created an example protocol to demonstrate the issue:
When we remove the extension, the protocol generates without any issues. Additionally, if we don't use typealiases as return values and instead use an actual tuple like this:
Issue Description
We are currently using version 4.0.4 of SwiftyMocky without any issues. However, when we try to update to version 4.1.0, we encounter an issue where one of our protocol functions is generated with a duplicate function. I have identified that this issue is related to the return type of the function.
I have created an example protocol to demonstrate the issue:
When we remove the extension, the protocol generates without any issues. Additionally, if we don't use typealiases as return values and instead use an actual tuple like this:
It also generates fine. We are curious to know why this behavior is occurring and if there is a way to make SwiftyMocky work as it was.
Environment
SwiftyMocky version: 4.1.0 Xcode version: 14.1
Thanks, Cagatay.