8.5.3 Type overloads

Delphi mode allows generic type overloads. This means that it is possible to declare the same generic class with different template type lists. The following declarations are therefore possible:

Type  
  TTest<T> = Class(TObject)  
  Private  
    FObj : T;  
  Public  
    Property Obj : T Read FObj Write FObj;  
  end;  
 
  TTest<T,S> = Class(TObject)  
  Private  
    FObj1 : T;  
    FObj2 : S;  
  Public  
    Property Obj1 : T Read FObj1 Write FObj1;  
    Property Obj2 : S Read FObj2 Write FObj2;  
  end;