Closed VisualDeceit closed 3 months ago
Hey @VisualDeceit!
Unfortunately protocol inheritance is not supported. This limitation stems from the nature of peer macros: you simply have no access to any information about the protocols you inherit from so there is no way of conforming to them automatically.
I know its not ideal, but you can conform to the inherited protocols in an extension and still use the generated mock implementation for testing:
#if MOCKING
extension MockSummaryService {
func fooA() {}
func fooB() {}
}
#endif
Hello. Is there a way to mocking protocols that combine multiple protocols? I try some like this, but got the error.
Type 'MockSummaryService' does not conform to protocol 'ServiceA'
Type 'MockSummaryService' does not conform to protocol 'ServiceB'