title: Can't invoke protocol method on generic type restricted by other protocol
body: <p>I have the following:</p>
  
  <pre><code>protocol Guard {
  
      var prisoners: Array&lt;Prisoner&gt;? { get set }
  
      func smack&lt;T: Prisoner&gt;(prisoner: T)
  
      func smackAll()
  
  
  }
  
  extension Guard {
  
      final func smackAll() {
  
          prisoners?.forEach() { smack($0) }
  
          //ERROR: "Cannot invoke 'smack' with an argument list of type '(Prisoner)'"
  
      }
  
  }
  
  protocol Prisoner {
  
      var guards: Array&lt;Guard&gt;? { get set }
  
  }
  
  extension Prisoner {
  
     final func incurBeating() {
  
          guards?.forEach() { $0.smack(self) }
  
      }
  
  }
  </code></pre>
  
  <p>I wish to assign the <code>Guard</code> protocol to any number of objects of different class types, and <code>Prisoner</code> to other objects. The objects acting as guards will have their own smack implementations, according to their class type. But I see no reason to re-write <code>smackAll</code> in each class that might inherit <code>Guard</code>. So I'm trying to do it like this, but the compiler isn't letting me. What am I missing?</p>