type
IFoo = Interface
['{2137BF60-AA33-11D0-A9BF-9A4537A42701}']
function F1 : Integer;
end;
IBar = Interface
['{2137BF61-AA33-11D0-A9BF-9A4537A42701}']
function F1: Integer;
end;
TFooBar = class(TInterfacedObject, IFoo, IBar)
//为同名方法取别名
function IFoo.F1 = FooF1;
function IBar.F1= BarF1;
//接口方法
function FooF1 : Integer;
function BarF1: Integer;
end;
如上 Delphi 可以将 接口方法映射定义 处理接口中的同名问题
但是如果要映射的方法是重载的方法, 我怎么试都不通过
比如将接口改为:
IBar = Interface
['{2137BF61-AA33-11D0-A9BF-9A4537A42701}']
function F1: Integer; overload;
function F1(a:integer): Integer; overload;
end;