fpc/tests/test/tobjc16.pp
Jonas Maebe 536529977a * added header
git-svn-id: trunk@14229 -
2009-11-20 18:38:42 +00:00

31 lines
606 B
ObjectPascal

{ %fail }
{ %opt=-vh -Seh }
{ %target=darwin }
{ %cpu=powerpc,powerpc64,i386,x86_64,arm }
{ Written by Jonas Maebe in 2009, released into the public domain }
{$modeswitch objectivec1}
type
ta = objcclass
{ should give an error about a wrong number of parameters --
the message name suggests two parameters, but the procedure
has only one. }
procedure test(a: longint); message 'test:a:';
end; external;
var
a: ta;
b: nsobject;
c: id;
begin
{ avoid hints about unused types/variables/units }
a:=nil;
if (a<>nil) then
exit;
c:=nil;
b:=c;
b.isEqual_(b);
end.