I updated my project to Swift 2, and received a bunch of redundant conformance of XXX to protocol YYY
. This happens especially often (or always) when a class conforms to CustomStringConvertible
. Also some place with Equatable
.
class GraphFeatureNumbersetRange: GraphFeature, CustomStringConvertible { // <--- get the error here
...
}
I suspect that I don't need to explicitly conform to a protocol when I implement var description: String { get }
, or whatever methods the protocol requires. Should I just follow fixit instructions and remove all these? Does Swift now automatically infer the conformance if a class implements all the protocol's methods?
CustomStringConvertible
is a new protocol in Swift 2 - see here. Not sure aboutGraphFeature
. – Aaron BragerPrintable
. – Martin R