s the value. Otherwise, the result will be a <em>concrete metatype</em>
  (<code>T.Type</code> for a non-protocol type <code>T</code>, or <code>P.Protocol</code> for a protocol
  <code>P</code>). Normally, this will do what you mean, but one wart to be aware
  of is when you use <code>type(of:)</code> in a generic context with a type
  parameter bound to a protocol type:</p>

<p>  <code>
  func foo&lt;T&gt;(x: T) -&gt; T.Type {
    return type(of: x)
  }
  protocol P {}
  func bar(x: P) {
    foo(x: x) // C