peter 26 years ago
parent
commit
5c391dc7e9
2 changed files with 27 additions and 1 deletions
  1. 25 0
      bugs/bug0291.pp
  2. 2 1
      bugs/readme.txt

+ 25 - 0
bugs/bug0291.pp

@@ -0,0 +1,25 @@
+{$mode tp}
+
+function ReturnString: string;
+begin
+  ReturnString := 'A string';
+end;
+
+procedure AcceptString(S: string);
+begin
+  WriteLn('Got: ', S);
+end;
+
+type
+  TStringFunc = function: string;
+
+const
+  SF: TStringFunc = ReturnString;
+var
+  S2: TStringFunc;
+begin
+  @S2:=@ReturnString;
+  AcceptString(ReturnString);
+  AcceptString(SF);
+  AcceptString(S2);
+end.

+ 2 - 1
bugs/readme.txt

@@ -339,6 +339,7 @@ Fixed bugs:
   bug0286.pp   #$08d not allowed as Char constant                   OK 0.99.13 (PFV)
   bug0286.pp   #$08d not allowed as Char constant                   OK 0.99.13 (PFV)
   bug0287.pp   (true > false) not supported                         OK 0.99.13 (PFV)
   bug0287.pp   (true > false) not supported                         OK 0.99.13 (PFV)
   bug0288.pp   crash with virtual method in except part             OK 0.99.13 (PFV)
   bug0288.pp   crash with virtual method in except part             OK 0.99.13 (PFV)
+  bug0291.pp   @procvar in tp mode bugs                             OK 0.99.13 (PFV)
 
 
 Unproducable bugs:
 Unproducable bugs:
 ------------------
 ------------------
@@ -378,4 +379,4 @@ bug0275.pp   too many warnings
 bug0277.pp   typecasting with const not possible
 bug0277.pp   typecasting with const not possible
 bug0281.pp   dup id checking with property is wrong
 bug0281.pp   dup id checking with property is wrong
 bug0289.pp   no hint/note for unused types
 bug0289.pp   no hint/note for unused types
-bug0290.pp   problem with storing hex numbers in integers
+bug0290.pp   problem with storing hex numbers in integers