fpc/tests/test/tobjc30a.pp
Jonas Maebe af85e45b67 + support for id.anyobjcmethodinscope() calls for Objective-Pascal code,
using standard FPC overload selection logic
  * fixed detection of references to static symbol tables for class
    helpers

git-svn-id: trunk@14234 -
2009-11-21 00:14:21 +00:00

37 lines
670 B
ObjectPascal

{ %target=darwin }
{ %cpu=powerpc,powerpc64,i386,x86_64,arm }
{ Written by Jonas Maebe in 2009, released into the Public Domain }
{$mode objfpc}
{$modeswitch objectivec1}
type
{ should succeed because both methods have the same selector }
ta = objcclass(NSObject)
function proc1(para: longint): longint; message 'proc1:';
end;
tb = objcclass(NSObject)
function proc1(para: longint): longint; message 'proc1:';
end;
function ta.proc1(para: longint): longint;
begin
writeln(para);
proc1:=para;
end;
function tb.proc1(para: longint): longint;
begin
writeln(para);
proc1:=para;
end;
var
a: id;
begin
a:=ta.alloc.init;
a.proc1(5);
end.