• 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: warning: local declaration hides instance variable
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: warning: local declaration hides instance variable


  • Subject: Re: warning: local declaration hides instance variable
  • From: Wincent Colaiuta <email@hidden>
  • Date: Mon, 3 Sep 2007 19:31:33 +0200

El 3/9/2007, a las 19:13, Tron Thomas escribió:

@interface Value : Object
{
@private
    int amount;
}
+ (Value*)valueWithAmount:(int)amount;

You have a instance variable called "amount" and a method-local variable called "amount" which hides it. Pick a different name for your "amount" parameter in the valueWithAmount: method. For example, "anAmount", or anything else.


Cheers,
Wincent

_______________________________________________
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: warning: local declaration hides instance variable
      • From: Laurence Harris <email@hidden>
References: 
 >warning: local declaration hides instance variable (From: Tron Thomas <email@hidden>)

  • Prev by Date: Re: warning: local declaration hides instance variable
  • Next by Date: Re: warning: local declaration hides instance variable
  • Previous by thread: Re: warning: local declaration hides instance variable
  • Next by thread: Re: warning: local declaration hides instance variable
  • Index(es):
    • Date
    • Thread