1 /* Contributed by Nicola Pero <nicola.pero@meta-innovation.com>, October 2010. */
2 /* { dg-do compile } */
4 /* Test that properties can be deprecated. */
8 #include <objc/runtime.h>
10 @interface MyRootClass
15 @property int a __attribute__((deprecated));
21 @implementation MyRootClass
22 + (id) initialize { return self; }
23 + (id) alloc { return class_createInstance (self, 0); }
24 - (id) init { return self; }
30 MyRootClass *object = [[MyRootClass alloc] init];
32 object.a = 40; /* { dg-warning "is deprecated" } */
33 if (object.a != 40) /* { dg-warning "is deprecated" } */