Swift protocol extension method is called instead of method implemented in subclass : <p>I've encountered a problem that is explained in the code below (Swift 3.1):</p>

<pre><code>protocol MyProtocol {
    func methodA()
    func methodB()
}

extension MyProtocol {
    func methodA() {
        print("Default methodA")
    }

    func methodB() {
        methodA()
    }
}

// Test 1
class BaseClass: MyProtocol {

}

class SubClass: BaseClass {
    func methodA() {
        print("SubClass methodA")
    }
}


let object1 = SubClass()
object1.methodB()
//

// Test 2
class JustClass: MyProtocol {
    func methodA() {
        print("JustClass methodA")
    }
}

let object2 = JustClass()
object2.methodB()
//
// Output
// Default methodA
// JustClass methodA
</code></pre>

<p>So I would expect that <em>"SubClass methodA"</em> text should be printed after <code>object1.methodB()</code> call. But for some reason default implementation of <code>methodA()</code> from protocol extension is called. However <code>object2.methodB()</code>call works as expected.</p>

<p>Is it another Swift bug in protocol method dispatching or am I missing something and the code works correctly?</p>
