mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-07 22:47:59 +02:00
17 lines
255 B
ObjectPascal
17 lines
255 B
ObjectPascal
{ %FAIL }
|
|
|
|
{ it's not allowed to call IUnknown methods on a function reference directly }
|
|
program tfuncref20;
|
|
|
|
{$mode delphi}
|
|
{$modeswitch functionreferences}
|
|
|
|
type
|
|
TProc = reference to procedure(aArg: LongInt);
|
|
|
|
var
|
|
p: TProc;
|
|
begin
|
|
p._AddRef;
|
|
end.
|