uobjc35f.pp 471 B

1234567891011121314151617181920212223242526272829303132
  1. { Written by Jonas Maebe in 2010, released into the public domain }
  2. {$mode objfpc}
  3. {$modeswitch objectivec1}
  4. unit uobjc35f;
  5. interface
  6. type
  7. MyExternalClass = objcclass; external;
  8. procedure test;
  9. implementation
  10. uses
  11. uobjc35e;
  12. procedure test;
  13. var
  14. a: MyExternalClass;
  15. begin
  16. { the definition in uobjc35e should override the external definition
  17. from this unit }
  18. a:=MyExternalClass.alloc.init;
  19. if a.myTest<>1234 then
  20. halt(1);
  21. a.release;
  22. end;
  23. end.