title: Protocol can only be used as a generic constraint because it has Self or associated type requirements
body: <p>I have this protocol:</p>
  <pre><code>protocol ViewType {
      associatedtype T: ViewData.View
      var data:T! {get set}
  }
  </code></pre>
  <p><code>ViewData.View</code> is a class</p>
  <p>I have a class called <code>TemplateLabel</code> that inherits <code>UILabel</code> and conforms to <code>ViewType</code></p>
  <pre><code>class TemplateLabel:UILabel, ViewType {
      var data: ViewData.View.Label!
  }
  </code></pre>
  <p>I get this <code>TemplateLabel</code> from storyboard as a <code>UIView</code> and try to cast the <code>UIView</code> into <code>ViewType</code> to assign the <code>data</code> property to it</p>
  <pre><code>let view = SB.instantiateViewControllerWithIdentifier(&quot;view_label&quot;).view
  if var v = view as? ViewType { // Error
      v.data = data // Error
  }
  </code></pre>
  <p>But I get errors:</p>
  <blockquote>
  <p>Protocol 'ViewType' can only be used as a generic constraint because it has Self or associated type requirements</p>
  <p>Member 'data' cannot be used on value of protocol type 'ViewType'; use a generic constraint instead</p>
  </blockquote>