mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-09 00:48:37 +02:00
18 lines
287 B
ObjectPascal
18 lines
287 B
ObjectPascal
{ %FAIL }
|
|
|
|
{ a function reference can't be cast to IUnknown in mode Delphi to call its
|
|
management functions }
|
|
program tfuncref22;
|
|
|
|
{$mode delphi}
|
|
{$modeswitch functionreferences}
|
|
|
|
type
|
|
TProc = reference to procedure(aArg: LongInt);
|
|
|
|
var
|
|
p: TProc;
|
|
begin
|
|
IUnknown(p)._AddRef;
|
|
end.
|