tthlp15.pp 274 B

123456789101112131415161718192021
  1. { %FAIL }
  2. { constructors without arguments are not allowed }
  3. program tthlp15;
  4. {$mode objfpc}
  5. {$modeswitch typehelpers}
  6. type
  7. TLongIntHelper = type helper for LongInt
  8. constructor Create;
  9. end;
  10. constructor TLongIntHelper.Create;
  11. begin
  12. Self := 2;
  13. end;
  14. begin
  15. end.