mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-08 10:28:16 +02:00
20 lines
355 B
ObjectPascal
20 lines
355 B
ObjectPascal
{ %FAIL }
|
|
|
|
{ function reference with different signatures can't be assigned to each other }
|
|
program tfuncref6;
|
|
|
|
{$mode objfpc}{$H+}
|
|
{$modeswitch functionreferences}
|
|
|
|
type
|
|
TFunc1 = reference to function(aArg: LongInt): String;
|
|
TFunc2 = reference to function(aArg: LongInt): LongInt;
|
|
|
|
var
|
|
f1: TFunc1;
|
|
f2: TFunc2;
|
|
begin
|
|
f2 := Nil;
|
|
f1 := f2;
|
|
end.
|