title: Subscript an Arrary of generics type: error: Cannot subscript a value of type '[T]'
body: <p>How to solve this problem?</p>
  
  <pre><code>protocol Mappable {
      ...
  }
  class Foo {
      item:AnyObject
  }
  class SomeClass&lt;T:Mappable&gt; {
      var someObject = Foo()
      var items:[T]
      ...
      func someFunction() {
          someObject.item = items[index] // error: Cannot subscript a value of type '[T]'
      }
  </code></pre>
  
  <p>I've tried adding an extension for subscripting <code>[T]</code> but fail:</p>
  
  <pre><code>extension Array where Element:Mappable {
      subscript(index: Int) -&gt; Element? {
          return indices ~= index ? self[index] : nil
      }
  }
  </code></pre>
  
  <p><strong>UPDATE: This is a misleading error message, please see answers below</strong></p>