It gets a little clearer if you understand that the relationship between methods in the protocol extension and methods in the conforming type is NOT inheritance. It's something new — call it replacement or something. This seems bizarre until you realize that protocol extensions are available for struct types as well as class types, and struct types do not have subclassing/inheritance. If conforming types were able to override protocol extension methods, then the subclassing mechanism would be effectively extended to struct types, which presumably is never going to happen.The difference of behavior between extension methods that appear as protocol requirements and ones that don't is explicitly documented, so you may not like it but it is what it is.However there is one horrible bug in the current implementation (bug #21470728). If you have a subclass of a class that adopts the protocol but the class does not provide its own version of a not-required method defined in the protocol ext
Topic:
Programming Languages
SubTopic:
Swift
Tags: