title: Swift opaque type as the return type?
body: <p><a href="https://docs.swift.org/swift-book/ReferenceManual/Types.html#ID616" rel="nofollow noreferrer">Swift Docs</a> says:</p>
  
  <blockquote>
    <p>Classes can’t use an opaque type as the return type of a nonfinal
    method.</p>
  </blockquote>
  
  <p>But this code compiles successfully:</p>
  
  <pre><code>protocol P {}
  class A:P {}
  class B {
    func myFunc() -&gt; some P {
      return A()
    }
  }
  </code></pre>
  
  <p>What is meant in the documentation?</p>