Hi,
Consider the attached source code. I have a base interface (IA) and a descendant interface (IB). Class TB is declared as
TB = class(TInterfacedObject, IB) end;Now I would expect that both
Supports(TB, IA)
Supports(TB, IB)
return true. After all, TB is forced to implement methods of both IA and IB, as IB descends from IA. But to my surprise, Supports(TB, IA) returns false.
Changing the declaration to
TB = class(TInterfacedObject, IA, IB) end;workarounds the problem (Supports(TB, IA) returns true), but seems strange in my opinion.
I haven't found any explanation for this e.g. in docs (http://freepascal.org/docs-html/rtl/sysutils/supports.html , http://freepascal.org/docs-html/ref/refch7.html ).
Is this the expected behavior? Documented anywhere? Or is this a bug, and I should submit it?
Thanks,
Michalis
