title: How to cast to a type of typealias T?
body: <p>Given some protocol: </p>
  
  <pre><code>protocol CellConfigurable {
      typealias CellType
  
      func configureCell(type: CellType)
  }
  </code></pre>
  
  <p>And a concrete class:</p>
  
  <pre><code>class SomeCellConfigClass: CellConfigurable {
     typealias CellType = SomeUITableViewCellSubclass
  
     func configureCell(type: CellType) {
        // do something    
     }
  }
  </code></pre>
  
  <p>How would you cast an object to T? e.g.</p>
  
  <pre><code>let cell = // dequeue a cell
  let cellConfigObj = SomeCellConfigClass()
  // can't do the following because cell is of type UITableViewCell
  // and it expects a type of CellType
  // someObj.configureCell(cell)
  
  // So, we need to cast cell to CellType...but how? The following doesn't work
  if let cell = cell as? someObj.CellType {
    someObj.configureCell(cell)
  }
  </code></pre>