tw3395.pp 354 B

12345678910111213141516171819202122232425262728
  1. { %fail }
  2. {$MODE DELPHI}
  3. type
  4. texec1 = class
  5. protected
  6. procedure execute;
  7. public
  8. constructor create;
  9. end;
  10. procedure t(p: pointer);
  11. begin
  12. end;
  13. constructor texec1.Create;
  14. begin
  15. { THis is not allowed }
  16. t(@execute);
  17. end;
  18. procedure texec1.execute;
  19. begin
  20. end;
  21. begin
  22. end.