title: Generics of generics in Swift 3
body: <p>I'm facing a strange problem, here it is: I wish to constraint one generic type with another generic type.</p>
  
  <p>Let me explain, I have a simple generic type:</p>
  
  <pre><code>class Simple&lt;T : Equatable&gt; { ... }
  </code></pre>
  
  <p>And I wish to have another generic type constraint with this simple (generic) type:</p>
  
  <pre><code>class Complex&lt;U : Simple&gt; { ... } // WRONG!
  </code></pre>
  
  <p>Of course that does not compile nor this:</p>
  
  <pre><code>class Complex&lt;U : Simple&lt;T : Equatable&gt;&gt; { ... } // WRONG!
  </code></pre>
  
  <p>nor:</p>
  
  <pre><code>class Complex&lt;U : Simple&lt;T&gt;&gt; where T : Equatable { ... } // WRONG!
  </code></pre>
  
  <p>The only way I found is:</p>
  
  <pre><code>class Complex&lt;T : Equatable, U : Simple&lt;T&gt;&gt; { ... } 
  </code></pre>
  
  <p>So I need to repeat <code>T</code> on each instanciation:</p>
  
  <pre><code>let x = Complex&lt;Date, Simple&lt;Date&gt;&gt;()
  </code></pre>
  
  <p>Worst, imagine if I have something like that:</p>
  
  <pre><code>class SimpleThing : Simple&lt;Thing&gt; { ... }
  let y = Complex&lt;Thing, SimpleThing&gt;()
  </code></pre>
  
  <p>How can I declare <code>Complex</code> for using it this way?:</p>
  
  <pre><code>let x = Complex&lt;Simple&lt;Date&gt;&gt;()
  let y = Complex&lt;SimpleThing&gt;()
  </code></pre>
  
  <p>Is it only possible in Swift 3?</p>
  
  <p>Thanks in advance.</p>