mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-07 13:08:13 +02:00

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 -
25 lines
483 B
ObjectPascal
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.
|