|-Wselector |(Objective-C and Objective-C++ only)
   Warn if multiple methods of different types for the same selector
   are found during compilation. The check is performed on the list of
   methods in the final stage of compilation. Additionally, a check is
   performed for each selector appearing in a |@selector(...)|
   expression, and a corresponding method for that selector has been
   found during compilation. Because these checks scan the method table
   only at the end of compilation, these warnings are not produced if
   the final stage of compilation is not reached, for example because
   an error is found during compilation, or because the -fsyntax-only
   option is being used.

same selector - return types are different.

The selector is only the 'something:' bit, it doesn't encode the return type or the argument types, so in dynamic binding selectors are required to have the same signature.


Torsten Curdt wrote:

Class A has method

 - (void) something:(Someclass*)s;

Class B has method

 - (BOOL) something:(Someclass*)s;

Why on earth am I getting a warning

 warning: multiple methods named '-something:' found
 using...
 also found...

They are on different objects. Should be obvious there is no problem.
Is this really just a "careful - you sure you picked the right one?"
Or what am I missing?

cheers
--
Torsten
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/rols%40rols.org

This email sent to [EMAIL PROTECTED]


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to