W dniu 2021-02-13 o 20:38, Sven Barth via fpc-pascal pisze:
Of course this does not provide any mechanism to directly add fields,
however the compiler could in theory optimize access through property
getters/setters if they're accessed through the surrounding class
instance instead of the interface.
So the complement could be generic classes like this:
type
generic TTestGeneric = class(<TAncenstorClass>, ITest, IInterface2)
private
fTest: TTestImpl;
public
property Test: TTestImpl read fTest implements ITest; default;
end;
TMyTest = specialize TTestGeneric(<TInheritedCalssOfTAncesot>);
Something similar has already been asked:
https://www.mail-archive.com/[email protected]/msg53599.html
Michał.
_______________________________________________
fpc-pascal maillist - [email protected]
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal