title: Difference between extension and direct call for protocol
body: <p>I got this code:</p>
  
  <pre><code>protocol Protocol {
      var id: Int { get }
  }
  
  extension Array where Element: Protocol {
      func contains(_protocol: Protocol) -&gt; Bool {
          return contains(where: { $0.id == _protocol.id })
      }
  }
  
  class Class {
      func method&lt;T: Protocol&gt;(_protocol: T) {
          var arr = [Protocol]()
  
          // Does compile
          let contains = arr.contains(where: { $0.id == _protocol.id })
  
          // Doens't compile
          arr.contains(_protocol: _protocol)
      }
  }
  </code></pre>
  
  <p>Why doesn't the line of code compile where I commented 'Doens't compile'? This is the error:</p>
  
  <pre><code>Incorrect argument label in call (have '_protocol:', expected 'where:')
  </code></pre>
  
  <p>When I change the method name in the extension to something else, like <code>containz</code> (and ofcourse change the name of the method that calls it to <code>containz</code>), I get this error when I try to call it:</p>
  
  <pre><code>Using 'Protocol' as a concrete type conforming to protocol 'Protocol' is not supported
  </code></pre>
  
  <p>But why doesn't it work when I try to call it through an extension, but it does work when I create the function in the extension directly? There isn't really any difference that I can see.</p>