title: Return generic interface implementation with different generic type
body: <p>I have created this simple generic interface:</p>
  
  <pre><code>public interface IInitializerSettings&lt;in ViewerType&gt; where ViewerType : Component
  {
      void Apply(ViewerType dataViewer);
  }
  </code></pre>
  
  <p>And added an implementation for it:</p>
  
  <pre><code>public class MenuSettings : IInitializerSettings&lt;CustomGridLayout&gt;
  {
      public void Apply(CustomGridLayout dataViewer)
      {
          Debug.Log("Applied");
      }
  }
  
  public class CustomGridLayout : CustomLayout
  {
      // The implementation code
  }
  </code></pre>
  
  <p>Now I try to use it like that:</p>
  
  <pre><code>public IInitializerSettings&lt;CustomLayout&gt; GetDefaultSettings()
  {
      return new MenuSettings();
  }
  </code></pre>
  
  <p>But I get this error "Cannot convert type MenuSettings to return type IInitializerSettings"</p>
  
  <p>I don't understand why it isn't allowed, <code>CustomGridLayout</code> inherits <code>CustomLayout</code>.</p>
  
  <p>All I could find is <a href="https://stackoverflow.com/questions/57490565/return-different-generics-that-implement-same-interface">this question</a>, but this solution doesn't work for me (I can't use the <code>out</code> keyword).</p>