1{ Old file: tbs0291.pp }
2{ @procvar in tp mode bugss                             OK 0.99.13 (PFV) }
3
4{$ifdef fpc}{$mode tp}{$endif}
5
6function ReturnString: string;
7begin
8  ReturnString := 'A string';
9end;
10
11procedure AcceptString(S: string);
12begin
13  WriteLn('Got: ', S);
14  if S<>'A string' then
15   begin
16     writeln('ERROR!');
17     halt(1);
18   end;
19end;
20
21type
22  TStringFunc = function: string;
23
24const
25  SF: TStringFunc = ReturnString;
26var
27  S2: TStringFunc;
28begin
29  @S2:=@ReturnString;
30  AcceptString(ReturnString);
31  AcceptString(SF);
32  AcceptString(S2);
33end.
34