tw2317.pp 459 B

123456789101112131415161718192021222324252627
  1. { Source provided for Free Pascal Bug Report 2317 }
  2. { Submitted by "Sergey Kosarevsky" on 2003-01-09 }
  3. { e-mail: [email protected] }
  4. {$static on}
  5. Type tObject=Object
  6. Function GetVMT:Pointer;Static;
  7. End;
  8. Function tObject.GetVMT:Pointer;
  9. Begin
  10. Exit(TypeOf(Self));
  11. End;
  12. var
  13. l : longint;
  14. Begin
  15. l:=Longint(tObject.GetVMT());
  16. WriteLn('self in static: ',l);
  17. if l<>0 then
  18. begin
  19. writeln('Error!');
  20. halt(1);
  21. end;
  22. End.