fpc/tests/test/tobjc41.pp
Jonas Maebe 990e47f2d3 * give a warning instead of an error if a parameter or local variable in a
an Objective-C method masks an identifier from a category, because due
    to the fact that all standard categories are imported at the same time via
    the CocoaAll unit, this can often happen with categories you don't know/
    care about. These errors also didn't happen in 2.6.x

git-svn-id: trunk@29497 -
2015-01-17 15:27:42 +00:00

25 lines
483 B
ObjectPascal

{ %target=darwin }
{ %fail }
{ %opt=-Sew }
{$mode objfpc}
{$modeswitch objectivec2}
uses
uobjc41;
type
NSDictionaryUtilities = objccategory (NSSubject)
{ the "key" paramter should give a warning because there's already a "key"
message in a category for NSObject }
function containsKey (key: NSString): boolean; message 'containsKey:';
end;
function NSDictionaryUtilities.containsKey (key: NSString): boolean;
begin
result:=false;
end;
begin
end.