title: Why generic Element behave different when defined as Double?
body: <p>I have a simple class: </p>
  
  <pre><code>class DimensionTree&lt;Element&gt; {
  
      var spot:Element
      var nextDim: [DimensionTree&lt;Element&gt;]
  
      init(_ spot:Element, _ nextDim: [DimensionTree&lt;Element&gt;] = [] ) {
          self.spot = spot
          self.nextDim = nextDim
      }
  }
  </code></pre>
  
  <p>And I try to add class function in extension:</p>
  
  <pre><code>extension DimensionTree {
      class func makeTreeFrom(_ spots:[[Element]], from level:Int = 0) -&gt; [DimensionTree &lt;Element&gt;]{
          if spots.count &gt; 0, spots[0].count &gt; 0 {
              var trees :[DimensionTree&lt;Element&gt;] = []
              let axisSpots = Set(spots.map { $0[0] })
              // Here I got an error: "Type 'Element' has no subscript members"
              //... some code
              return trees
          }
          return []
      }
  }
  </code></pre>
  
  <p>I got an error <code>"Type 'Element' has no subscript members"</code>. But if I assign Element == Double:</p>
  
  <pre><code>extension DimensionTree where Element == Double
  </code></pre>
  
  <p>extension compiles and works with no problem. Double has no <code>subscript members</code> too, Elelment is inside list of lists... Why it could not compile?</p>