tthlp16.pp 364 B

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