blob: 87cf9f570d25b3d24b94e03d4bb3d43670c84b56 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
{ %fail }
program intfbug2;
{$ifdef fpc}
{$mode objfpc} {$H+}
{$endif fpc}
uses
Classes, SysUtils;
type
IMyCom1 = interface
procedure A1;
end;
IMyCom2 = interface
procedure A2;
end;
TMyComCorba = class(TInterfacedObject, IMyCom1, IMyCom2)
procedure A1;
procedure A2;
procedure B;
end;
procedure TMyComCorba.A1;
begin
WriteLN('Com1');
end;
procedure TMyComCorba.A2;
begin
WriteLN('Com2');
end;
procedure TMyComCorba.B;
begin
WriteLN('Corba');
end;
var
I: IUnknown;
A1: IMyCom1;
A2: IMyCom2;
begin
I := TMyComCorba.Create;
if Supports(I, IMyCom1, A1) then A1.A1;
end.
|