I've implemented ==
, <
, >
funcs as NSDate
extension. The code itself is working well. The problem starts in unit tests, where I use Quick
& Nimble
and one of these must also have implemented the given protocol. What can I do now? Protocol is public
, both the library and my code implements it, so it obviously generates an error.
The error itself: Redundant conformance of 'NSDate' to protocol 'Comparable'
.
-- edit --
Just a side note to clarify: I cannot remove the implementation in my classes, because I do not want to import Quick
/Nimble
in non-test targets.
-- edit -- I'm using Swift 2.2. Comparable code is basically equal to: https://stackoverflow.com/a/28109990/849616.