title: The type 'TNestedInterface' must be convertible to 'INestedInterfaceTest' in order to use it as parameter 'TNestedInterface'
body: <pre><code>public interface INestedInterfaceTest&lt;TChildType&gt;
      where TChildType : INestedInterfaceTest&lt;TChildType&gt;
  {
       List&lt;TChildType&gt; children { get; set; }
  }
  
  public abstract class NestedInterfaceTest : INestedInterfaceTest&lt;NestedInterfaceTest&gt;
  {
      public List&lt;NestedInterfaceTest&gt; children { get; set; }
  
      public TNestedInterface GetNestedInterface&lt;TNestedInterface&gt;()
          where TNestedInterface : NestedInterfaceTest, new()
      {
          return GateWay&lt;TNestedInterface&gt;.GetNestedInterface();
      }
  }
  
  public class GateWay&lt;TNestedInterface&gt;
      where TNestedInterface : class, INestedInterfaceTest&lt;TNestedInterface&gt;, new()
  {
      public static TNestedInterface GetNestedInterface()
      {
          return new TNestedInterface();
      }
  }
  </code></pre>
  
  <p>Things go wrong at the GetNestedInterface method in the abstract class.
  The error message is: <strong>The type 'TNestedInterface' must be convertible to 'INestedInterfaceTest' in order to use it as parameter 'TNestedInterface' in the generic class 'GateWay'</strong>.</p>
  
  <p>But..., my abstract class <strong>NestedInterfaceTest</strong> implements the <strong>INestedInterfaceTest</strong> interface.
  What am I missing here?</p>
  
  <p>The following does work, without the recursive interface implementation:</p>
  
  <pre><code>public interface INestedInterfaceTest
  {
  }
  
  public abstract class NestedInterfaceTest : INestedInterfaceTest
  {
      public List&lt;NestedInterfaceTest&gt; children { get; set; }
  
      public TNestedInterface GetNestedInterface&lt;TNestedInterface&gt;()
          where TNestedInterface : NestedInterfaceTest, new()
      {
          return GateWay&lt;TNestedInterface&gt;.GetNestedInterface();
      }
  }
  
  public class GateWay&lt;TNestedInterface&gt;
      where TNestedInterface : class, INestedInterfaceTest, new()
  {
      public static TNestedInterface GetNestedInterface()
      {
          return new TNestedInterface();
      }
  }
  </code></pre>
  
  <p>It seems that it goes wrong in the recursive implementation.</p>