On Thu, Jul 10, 2008 at 9:49 AM, an0 <[EMAIL PROTECTED]> wrote:
> Thanks. But isn't it annoying for XCode to pretend to know something
> for sure while in fact it is just a wrong guess? At least the warning
> is very misleading.

The warning isn't misleading at all. Xcode is not pretending anything.
It *does* know it for sure, it's just *wrong*. The warning then
appears because this wrong information causes other problems in the
code later on, due to a mismatched type.

The compiler definitely should complain if it has two methods with the
same name but different return types to choose from, and it doesn't
know which one is right. I've seen it happen many times. If it didn't
happen to you, it's because either it wasn't seeing one of them, or
because you found a compiler bug.

This is an inherent hazard of using the "id" type. For best results,
you should avoid using any method name which is already in use unless
your return type is compatible with the one already in use.

Mike
_______________________________________________

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