title: Swift Cast as Generic crashing with UInt
body: <p>Why does the following Array extension crash if the array used with it is of type UInt, but works if the array is of type Int or String?</p>
  
  <pre><code>extension Array
  {
  func indexOf&lt;T:Equatable&gt;(value:T) -&gt; Int?
  {
      for (i, val) in enumerate(self)
      {
          if (val as T == value)
          {
              return i;
          }
      }
      return nil;
  }
  }
  
  var a:[UInt] = [243, 234, 1, 212, 3, 56, 88, 11, 77];
  var i = a.indexOf(234);
  </code></pre>
  
  <p>Error produced:</p>
  
  <p>Playground execution failed: error: Execution was interrupted, reason: EXC_BREAKPOINT (code=EXC_I386_BPT, subcode=0x0).
  The process has been left at the point where it was interrupted, use "thread return -x" to return to the state before expression evaluation.
  * thread #1: tid = 0x27a3c, 0x00000001079d3f27 libswift_stdlib_core.dylib<code>swift_dynamicCast + 1063, queue = 'com.apple.main-thread', stop reason = EXC_BREAKPOINT (code=EXC_I386_BPT, subcode=0x0)
    * frame #0: 0x00000001079d3f27 libswift_stdlib_core.dylib</code>swift_dynamicCast + 1063
      frame #1: 0x00000001137bbbc8</p>