program fpc_bug; {$mode objfpc} {$interfaces CORBA} uses Variants; type IInterfaceA = interface procedure Afunction( x : byte ); end; IInterfaceB = interface procedure Bfunction( s : AnsiString ); end; TBaseObject = class(IInterfaceA) procedure Afunction( x : byte ); // implemented from IInterfaceA end; TOtherObject = class(TBaseObject, IInterfaceB) procedure Bfunction( s : AnsiString ); // implemented from IInterfaceB end; procedure TBaseObject.Afunction( x : byte ); begin Writeln('TBaseObject : ', x ); end; procedure TOtherObject.Bfunction( s : AnsiString ); begin Writeln('TOtherObject : ', s ); end; var oo : TOtherObject; o : TObject; begin oo := TOtherObject.Create; o := oo; (o as IInterfaceA).AFunction(42); end.