title: Generic class type constraint with a generic class having another constraint
body: <p>Let's say I have a generic class</p>
  <pre><code>public class G&lt;T&gt; {
  }
  </code></pre>
  <p>and I want to declare final class as</p>
  <pre><code>public class F&lt;T&gt; where T : G&lt;T&gt; {
  }
  </code></pre>
  <p>that seems to be possible, but what if I want to complicate the task and add a constraint to the class G like that</p>
  <pre><code>public class A {
  }
  
  public class DA : A {
  }
  
  public class DB : A {
  }
  
  public class G&lt;T&gt; where T : A {
  }
  </code></pre>
  <p>and finally I want to do this</p>
  <pre><code>public class F&lt;T&gt; where T : G&lt;T&gt; {
  }
  </code></pre>
  <p>that does not work, it says T has to be of type A which is understandable and it looks like I can rewrite it like this</p>
  <pre><code>public class F&lt;T, U&gt; where T : G&lt;U&gt; where U : A {
  }
  </code></pre>
  <p>but in this case the usage has a redundant declaration</p>
  <pre><code>public class DF : F&lt;G&lt;DA&gt;, DA&gt; {
  }
  </code></pre>
  <p>I have to repeat DA twice when using class F even though it is quite clear if I use G as a generic type the generic type of G is DA. Is there a way to avoid this redundancy?</p>