I read the documentation about Protocols and can't find any information about protocol inheriting from a class, but the code compiles. As far as I remember protocols can only inherit other protocols, I have never seen protocol that inherits from a class. I don't even know a language that allows such behaviour.
class A { } protocol X: A { } // forced to inherit from class A, because of X protocol class B: A, X { } Is it some kind of bug?
protocol X where Self:Aand that this short way to write it has been added recently (Swift 5?).