Re: Xcode is confusing two source files in the middle of a line. Anybody seen this?
Re: Xcode is confusing two source files in the middle of a line. Anybody seen this?
- Subject: Re: Xcode is confusing two source files in the middle of a line. Anybody seen this?
- From: Jens Alfke <email@hidden>
- Date: Mon, 11 Jul 2011 09:23:21 -0700
On Jul 11, 2011, at 12:35 AM, Quincey Morris wrote: If you check the documentation for 'alloc', you'll see that its return type is 'id'. This gives the compiler no help in deciding which of several incompatible declarations of the 'initWithContainer:' method to choose. You have an ambiguous method signature for selector 'initWithContainer:', and that isn't allowed.
Clang (at least newer versions) understands that +alloc returns the same type as its receiver, so it will do proper type-checking in this case. But in general it’s still bad to have two methods with the same selector but different parameter/return types, since there are so many other common methods that return id.
—Jens |
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden