tw28475.pp 338 B

123456789101112131415161718192021222324
  1. { %opt=-g-t }
  2. program trashtest;
  3. {$MODE OBJFPC}
  4. type
  5. TTestRec = record
  6. Field1 : Int64;
  7. end;
  8. operator := (i: TTestRec) fR: Int64;
  9. begin
  10. fR := i.Field1;
  11. end;
  12. function TestFunc:TTestRec;
  13. begin //error reported here
  14. TestFunc.Field1 := 1;
  15. end;
  16. begin
  17. WriteLn(TestFunc.Field1);
  18. end.