fpc/tests/test/tobjc40.pp
Jonas Maebe fe90823b01 * support the "overload" modifier for Objective-C methods
* only check whether the message identifier of an Objective-C method
    matches the one from a method with the same name in a parent class
    if the parameters match (todo: should be refined to "if the
    encoded Objective-C selector names match")

git-svn-id: trunk@22373 -
2012-09-11 21:58:40 +00:00

30 lines
478 B
ObjectPascal

{ %target=darwin }
{ %opt=norun }
{$mode objfpc}
{$modeswitch objectivec1}
program Main;
type
NSView = objcclass(NSObject)
procedure setNeedsDisplay (flag: boolean); message 'setNeedsDisplay:';
end;
type
NSViewUtilities = objccategory (NSView)
procedure setNeedsDisplay; message 'setNeedsDisplay'; overload;
end;
procedure NSView.setNeedsDisplay (flag: boolean);
begin
end;
procedure NSViewUtilities.setNeedsDisplay;
begin
setNeedsDisplay(true);
end;
begin
end.