title: Is it possible to create a type alias to a generic class in Delphi
body: <p>I would like to define a class type (type alias) for a generic class. I would like to do this so users of unit b can have access to TMyType without using unit a.
  I have units like this:</p>
  
  <pre><code>unit a;
  interface
  type
    TMyNormalObject = class
      FData: Integer;
    end;
    TMyType&lt;T&gt; = class
      FData: &lt;T&gt;;
    end;
  implementation
  end.
  
  unit b;
  interface
  type
    TMyNormalObject = a.TMyNormalObject;  // works
    TMyType&lt;T&gt; = a.TMyType&lt;T&gt;; // E2508 type parameters not allowed on this type
  implementation
  end.
  </code></pre>
  
  <p>I already found a possible workaround which I don't like because it can introduce hard to find bugs:</p>
  
  <pre><code>TMyType&lt;T&gt; = class(a.TMyType&lt;T&gt;); 
  </code></pre>
  
  <p>The problem with this approach is that it introduces a new class type and an a.TMyType instance is not a b.TMyType (while a.TMyNormallClass is a b.TMyNormalClass and vice versa - they are referring to the same class).</p>