tb0214a.pp 363 B

1234567891011121314151617181920212223
  1. { %fail }
  2. {$ifdef fpc}
  3. {$mode delphi}
  4. {$endif}
  5. type
  6. tc = class
  7. private
  8. fl: longint;
  9. public
  10. property l: longint read fl write fl;
  11. end;
  12. var
  13. c: tc;
  14. begin
  15. { should give an error stating that you cannot assign to left hand side }
  16. { (generated code also does not result in an assignment) }
  17. cardinal(c.l):=cardinal(5);
  18. end.