[fpc-devel] Generics, TObject Descendant?

Den cyraid at gmail.com
Wed Feb 18 20:51:21 CET 2015


Hi there,

Currently this code:

   TSomeObject<T> = Class;
   TSomeOtherObject<T : TObject> = Class(TSomeObject<T> );

And finally:

   TMyObject = Class;
   TSomeOtherOtherObject<T : TMyObject> = Class(TSomeOtherObject<T> );

Comes up with error 'got "T" expected "TObject"' .. But TMyObject is 
based off of TObject?

- Dennis



More information about the fpc-devel mailing list