tb0109.pp 225 B

12345678910111213141516171819202122
  1. { %fail }
  2. {$mode delphi}
  3. type
  4. tcl1=class
  5. end;
  6. tcl2=class(tcl1)
  7. end;
  8. procedure p1(var p:tcl1);
  9. begin
  10. end;
  11. var
  12. t : tcl2;
  13. begin
  14. t:=tcl2.create;
  15. { in delphi the passed argument must match exact }
  16. p1(t);
  17. end.