Skip to content

Generic vs non generic TObjectList type, Delphi incompatibility

The attached file compiles in Delphi, but not in FPC:

typeselect.dpr(16,51) Error: Generics without specialization cannot be used as a type for a variable

A method uses (plain) TObjectlist, but generics.collections is in the uses list after contnrs. Apparently Delphi generics is apart of the identifier, and types don't collide ?

typeselect.dpr

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information