• 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
type of accessor does not match the type of property
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

type of accessor does not match the type of property


  • Subject: type of accessor does not match the type of property
  • From: Quincey Morris <email@hidden>
  • Date: Fri, 11 Jul 2008 19:51:42 -0700

In Xcode 3.1, recompiling an existing Xcode project with gcc4.2, the following pattern:

	//	in Foo.h
	@interface Foo {
		NSMutableArray*	someArray;
	}
	@property (readonly) NSArray* someArray;

	//	in Bar.m
	... foo.someArray ...

*sometimes* produces the following error message:

type of accessor does not match the type of property someArray

The code, obviously, compiled without error in gcc4.0.

This doesn't happen in every .m file that contains a reference like 'foo.someArray', and it doesn't happen with every property defined according to this pattern. Changing the type of the property to NSMutableArray* makes the error message go away. Changing the name of the instance variable in the header file makes the error message go away.

Anyone know if there's something genuine being complained about here, or if there's any way to prevent the error (besides the unpalatable option of renaming the instance variables)?


_______________________________________________ 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: type of accessor does not match the type of property
      • From: Bryan Henry <email@hidden>
  • Prev by Date: Re: SenTestingKit/Xcode 3.1 error
  • Next by Date: RE: Jump to Definition problem
  • Previous by thread: Re: SenTestingKit/Xcode 3.1 error
  • Next by thread: Re: type of accessor does not match the type of property
  • Index(es):
    • Date
    • Thread