title: Cannot convert value of type with matching types - have I hit a compiler limitation?
body: <p>Background: </p>
  
  <p>I'm building an app with a service layer that should return models that are similar (e.g. all have a <code>text: String</code> property, defined in a protocol <code>TextModel</code>). The service holds a repository which finds and returns models of a concrete type conforming to <code>TextModel</code>. The repository needs to keep it's concrete type information for internal workings. I want to keep the service free from the model's concrete type so I don't have to repeat it for every model type.  The compiler isn't letting me do this...</p>
  
  <p>Problem:</p>
  
  <p>The following code that I have simplified in a Playground will not compile: </p>
  
  <pre><code>enum Result&lt;T&gt; {
  
      case success(T)
      case error
  }
  
  // Model Layer
  
  protocol TextModel {
  
      var text: String { get }
  }
  
  struct Person: TextModel {
  
      let text: String
  }
  
  // Service Layer
  
  class TextModelService {
  
      let repository: TextModelRepositoryType
  
      init(repository: TextModelRepositoryType) {
  
          self.repository = repository
      }
  
      func find(completion: @escaping (Result&lt;TextModel&gt;) -&gt; ()) {
  
          repository.find(completion: completion)
      }
  }
  
  // Repository Layer
  
  protocol TextModelRepositoryType {
  
      func find(completion: @escaping (Result&lt;TextModel&gt;) -&gt; ())
  }
  
  protocol PersonRepositoryType {
  
      func findPerson(completion: @escaping (Result&lt;Person&gt;) -&gt; ())
  }
  
  class PersonRepository: PersonRepositoryType, TextModelRepositoryType {
  
      func find(completion: @escaping (Result&lt;TextModel&gt;) -&gt; ()) {
  
          // ERROR HERE: "Cannot convert value of type '(Result&lt;TextModel&gt;) -&gt; ()' to expected argument type '(Result&lt;Person&gt;) -&gt; ()'"
          findPerson(completion: completion)
      }
  
      func findPerson(completion: @escaping (Result&lt;Person&gt;) -&gt; ()) {
  
          let person = Person(text: "Adam")
          completion(.success(person))
      }
  }
  
  let repository = PersonRepository()
  let service = TextModelService(repository: repository)
  service.find { result in
  
      // result should be a Result&lt;Person&gt;
  }
  </code></pre>
  
  <p>I don't understand why the compiler states that it <code>'Cannot convert value of type '(Result&lt;TextModel&gt;) -&gt; ()' to expected argument type '(Result&lt;Person&gt;) -&gt; ()'</code> when <code>Person</code> definitely conforms to <code>TextModel</code>...</p>
  
  <p>What's also interesting is that when I remove the <code>Result</code> type and just pass an unwrapped type in the completion (e.g. <code>(TextModel?) -&gt; ()</code>) the compiler has no qualms.</p>
  
  <p>Have I hit a limitation in the Swift compiler? Or am I missing something? </p>