Swift protocol extension method dispatch with superclass and subclass
问题 I found an interesting behaviour which seems like a bug... Based on the behaviour described the following articles: https://medium.com/ios-os-x-development/swift-protocol-extension-method-dispatch-6a6bf270ba94 http://nomothetis.svbtle.com/the-ghost-of-swift-bugs-future The output is not what I expect, when I add SomeSuperclass , rather than directly adopting the protocol. protocol TheProtocol { func method1() } extension TheProtocol { func method1() { print("Called method1 from protocol