Am 18.02.2021 um 20:33 schrieb Martin Frb via fpc-pascal:
could be written asgeneric TTrait<T> = class(T) procedure Bar; end; TMyFoo = class(specialize TTrait<TFooBase>) procedure Foo; end; Of course that can get out of hand, if you want to include many traits.
You need to constrain T as a TObject, then it works. Regards, Sven _______________________________________________ fpc-pascal maillist - [email protected] https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
