title: Generic object needs a cast even though it implements the required interface
body: <p>Don't think the title can explain what i'm on about and it's a bit difficult to explain, so i'll let the code do the talking.  You can copy+paste this into LINQPad and run it as a C# program, or make the necessary adjustments as a regular c# project in visual studio (e.g.: change calls to Dump() to Console.Writeline() etc.) -</p>
  
  <p>Note that if you uncomment out the line in the doStuff method, it won't compile.</p>
  
  <p>My question is, why do i need the cast when generic2 already implements <code>Iab&lt;TA,TB&gt;</code>?  Is this some covariance thing?  I'm still on .NET 3.5.</p>
  
  <pre><code>void Main()
  {
      doStuff&lt;a,b&gt;();
  }
  
  public void doStuff&lt;TA, TB&gt;()
  where TA : class, Ia, new()
  where TB : class, Ib, new()
  {
      Iab&lt;TA, TB&gt; x = null;
  
      x = new generic1&lt;TA, TB&gt;();
      x.Go().Dump();
  
      //x = new generic2&lt;TA&gt;(); // &lt;-Cannot implicitly convert type 'UserQuery.generic2&lt;TA&gt;' to 'UserQuery.Iab&lt;TA,TB&gt;'. An explicit conversion exists (are you missing a cast?)
      x = (Iab&lt;TA, TB&gt;) new generic2&lt;TA&gt;();
      x.Go().Dump();
  }
  
  public interface Ia
  {}
  
  public interface Ib
  {}
  
  public class a : Ia
  {}
  
  public class b : Ib
  {}
  
  public interface Iab&lt;TA,TB&gt;
  where TA : class, Ia, new()
  where TB : class, Ib, new()
  {
      string Go();
  }
  
  public class generic1&lt;TA, TB&gt; : Iab&lt;TA,TB&gt;
  where TA : class, Ia, new()
  where TB : class, Ib, new()
  {
      public string Go()
      {
          return "generic Base called";
      }
  }
  
  public class generic2&lt;TA&gt; : Iab&lt;TA,b&gt;
  where TA : class, Ia, new()
  {
  public string Go()
      {
          return "generic Sub called";
      }
  }
  </code></pre>