fpc/tests/test/tobjc8a.pp
Jonas Maebe 0c675a4039 * the objc1 unit has been renamed to objc
* the objc unit links against the Foundation instead of against the Cocoa
    framework, and inludes an interface to either the fragile or non-fragile
    obj-c run time depending on the target platform
  + support for the non-fragile Objective-C runtime/ABI, as used on Mac OS X
    for ARM (iPhone) 64 bit (PowerPC/64, x86_64) -- all these targets now
    are now also supported for the objectivec1 modeswitch
  + support for private_extern symbol bindings, required for the above
  * mark objcclasses that are declared in the implementation section of a
    unit as "hidden" (not sure what the effect is, since the Objective-C
    runtime does not seem to do anything with this flag)
  * enabled all obj-c tests for the newly supported platforms

git-svn-id: branches/objc@13763 -
2009-09-27 15:24:50 +00:00

25 lines
450 B
ObjectPascal

{ %target=darwin }
{ %cpu=powerpc,powerpc64,i386,x86_64,arm }
{ %opt=-vh -Seh }
{ %norun }
{$mode objfpc}
{$modeswitch objectivec1}
uses
ctypes;
type
TMyTestClass = objcclass(NSObject)
{ should not give a hint, since we have 'override' }
function hash: cuint; override;
end; external name 'NSObject';
var
a: id;
begin
{ avoid warnings/hints about unused types/variables }
a:=TMyTestClass.alloc;
tmytestclass(a).Retain;
end.