title: Parent child relationship with protocols in Swift
body: <p>I'm trying to describe parent child model with protocols in Swift 3.</p>
  
  <pre><code>protocol CatalogFilter: class {
  
      var title: String { get }
  
      associatedtype FilterItem: CatalogFilterItem
      var items: [FilterItem] { get }
  
  }
  
  protocol CatalogFilterItem: class {
  
      associatedtype Filter: CatalogFilter
      var filter: Filter? { get }
  
      var title: String { get }
  
  }
  </code></pre>
  
  <p>But I get an error <code>type may not reference itself as a requirement
      associatedtype FilterItem: CatalogFilterItem</code> for <code>associatedtype FilterItem: CatalogFilterItem</code> and the same error for <code>associatedtype Filter: CatalogFilter</code></p>
  
  <p>Maybe someone knows how to handle such issue?</p>