tw3829.pp 413 B

12345678910111213141516171819202122232425262728
  1. { Source provided for Free Pascal Bug Report 3829 }
  2. { Submitted by "Thomas Schatzl" on 2005-03-25 }
  3. { e-mail: }
  4. {$mode delphi}
  5. uses
  6. sysutils;
  7. type
  8. IAny = interface ['{A40AEE53-8C88-4DD2-9F14-05A8C1A64849}']
  9. end;
  10. TAny = class(TInterfacedObject, IAny)
  11. end;
  12. var
  13. a : TAny;
  14. begin
  15. a:=TAny.Create;
  16. (a as IAny)._Addref();
  17. if (supports(a, IAny)) then
  18. writeln('ok')
  19. else
  20. halt(1);
  21. end.