type of accessor does not match the type of property
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