On 03/02/2026 00:59, Martin Frb via fpc-devel wrote:
If I drop the constraints, then I can just use independent interfaces...
But then still, each interface has a
function GetItem: TSomeType; // diff type for each interface
And the generic will call that GetItem, on all of them. Not much
difference.
I could probably just have
function Item: IBaseIntf
and return the inherited inteface as IBaseIntf, and on the receiving end
(in the generic, and other code) typecast it back...
(not tested, but should work).
But then I can also just drop the constraints...
I am trying to ditch as little of the available type as possible.
_______________________________________________
fpc-devel maillist - [email protected]
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel