title: Why can this protocol "only be used as a generic constraint"?
body: <p>I'm attempting to do the following in Swift:</p>
  
  <pre><code>protocol ProtocolWithAlias {
      typealias T
  }
  
  protocol AnotherProtocol {
      func someFunc() -&gt; ProtocolWithAlias
  }
  </code></pre>
  
  <p>But I get the error: <code>Protocol 'ProtocolWithAlias' can only be used as a generic constraint because it has Self or associated type requirements</code>.</p>
  
  <p>Is it possible to do something like this? The error message (or at least the "<code>only be used as a generic constraint</code>" part) doesn't seem to make much sense to me.</p>
  
  <p>I'm using the latest Xcode 6 beta 3.</p>
  
  <p>Thanks!</p>