ub0569.pp 681 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. { %norun }
  2. {$mode objfpc}
  3. unit ub0569;
  4. interface
  5. type
  6. generic TGen<T> = class
  7. function getstring : string;
  8. function getwidestring : widestring;
  9. function getint : int64;
  10. function getreal : real;
  11. end;
  12. implementation
  13. function TGen.getstring : string;
  14. begin
  15. result:='Free Pascal';
  16. end;
  17. function TGen.getwidestring : widestring;
  18. begin
  19. { force widestring }
  20. result:='Free Pascal'#1234;
  21. end;
  22. function TGen.getint : int64;
  23. begin
  24. result:=1234123412341234;
  25. end;
  26. function TGen.getreal : real;
  27. begin
  28. result:=333.0;
  29. end;
  30. end.