[fpc-pascal] Overriding generic methods

Ryan Joseph ryan at thealchemistguild.com
Fri Feb 10 03:47:57 CET 2017


Is overriding methods from specialized generic classes supported in any way? I tried the following below but it doesn’t seem to work. 

type	
  generic TList<T> = class (TObject)
		procedure Add (value: T); virtual;
	end;


type	
	TObjectListAbstract = specialize TList<TObject>;
  TObjectList = class (TObjectListAbstract)
		procedure Add (value: T); override;
	end;	




Regards,
	Ryan Joseph




More information about the fpc-pascal mailing list