[fpc-pascal] type constraints in generics?

Thierry Coq tcoq at free.fr
Tue Apr 27 07:04:05 CEST 2010


please find attached a very simple test of generics. I would like to 
limit the actual type in this list to be a child class of TObject. Is 
this possible and if yes, how can it be done?

In a more general question, what are the differences between the FPC 
generics and the C# generics (the ones used by the newer versions of 
Delphi)? In addition to the syntax, of course?

Best regards,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: TestGenerics.zip
Type: application/zip
Size: 67364 bytes
Desc: not available
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20100427/50ee7552/attachment.zip>

More information about the fpc-pascal mailing list