mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2026-01-10 01:22:37 +01:00
o "unique" class (and interface) type aliases should actually not exist at
all except for overload resolution. All the rest (VMT, UUID, RTTI, ...)
should be taken from the aliased class/interface
o there is one Delphi-incompatibily left after this change, but it shouldn't
matter: tw8180 does not compile if you change the declaration to
"tcl=class(TInterfacedObject,XStr,iinterface)", while Kylix does compile
that. It doesn't really matter though, because in Kylix this actually
adds iinterface twice as implemented interface, so there is no point
in accepting this.
git-svn-id: trunk@46773 -
24 lines
346 B
ObjectPascal
24 lines
346 B
ObjectPascal
{ %recompile }
|
|
|
|
{$mode objfpc}
|
|
|
|
uses uw8180;
|
|
|
|
type
|
|
tcl=class(TInterfacedObject,XStr)
|
|
end;
|
|
|
|
var
|
|
x : tcl;
|
|
p: pointer;
|
|
i: iunknown;
|
|
begin
|
|
x:=tcl.create;
|
|
x._Addref;
|
|
i:=x as iunknown;
|
|
if (x as iunknown).queryinterface(xstr,p) <> S_OK then
|
|
halt(1);
|
|
if (x as iunknown).queryinterface(iinterface,p) <> S_OK then
|
|
halt(2);
|
|
end.
|