title: Nested types inside a protocol
body: <p>It is possible to have nested types declared inside protocols, like this:</p>
  
  <pre><code>protocol Nested {
  
      class NameOfClass {
          var property: String { get set }
      }
  }
  </code></pre>
  
  <p>Xcode says <strong>"Type not allowed here"</strong>:</p>
  
  <blockquote>
    <p>Type 'NameOfClass' cannot be nested in protocol 'Nested'</p>
  </blockquote>
  
  <p>I want to create a protocol that needs to have a nested type. Is this not possible or I can do this in another other way?</p>