• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Xcode is confusing two source files in the middle of a line. Anybody seen this?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Xcode is confusing two source files in the middle of a line. Anybody seen this?
      • From: G S <email@hidden>
References: 
 >Xcode is confusing two source files in the middle of a line. Anybody seen this? (From: G S <email@hidden>)
 >Re: Xcode is confusing two source files in the middle of a line. Anybody seen this? (From: Quincey Morris <email@hidden>)

  • Prev by Date: Re: Xcode is confusing two source files in the middle of a line. Anybody seen this?
  • Next by Date: Re: Corrupted Project
  • Previous by thread: Re: Xcode is confusing two source files in the middle of a line. Anybody seen this?
  • Next by thread: Re: Xcode is confusing two source files in the middle of a line. Anybody seen this?
  • Index(es):
    • Date
    • Thread