blob: 505a55998d01b9bf6b8b816cb9fb0675c6d28623 [file] [log] [blame]
/* APPLE LOCAL file radar 4966565 */
/* This test is for categories which don't implement the accessors but some accessors are
implemented in their base class implementation. In this case,no warning must be issued.
*/
/* { dg-options "-fobjc-new-property -mmacosx-version-min=10.5" } */
/* { dg-do compile { target *-*-darwin* } } */
@interface MyClass
{
int _foo;
}
@property(readonly) int foo;
@end
@implementation MyClass
- (int) foo { return _foo; }
@end
@interface MyClass (private)
@property(readwrite) int foo;
@end
@implementation MyClass (private)
- (void) setFoo:(int)foo { _foo = foo; }
@end
@interface MyClass (public)
@property(readwrite) int foo;
@end
@implementation MyClass (public)
@end /* { dg-warning "property 'foo' requires the method 'setFoo:'" } */