diff options
Diffstat (limited to 'test/SemaObjC/objc-class-property.m')
-rw-r--r-- | test/SemaObjC/objc-class-property.m | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/SemaObjC/objc-class-property.m b/test/SemaObjC/objc-class-property.m index 56285976e194..f8d49112766d 100644 --- a/test/SemaObjC/objc-class-property.m +++ b/test/SemaObjC/objc-class-property.m @@ -21,6 +21,8 @@ @property (class) int c2; // expected-note {{property declared here}} \ // expected-note {{property declared here}} @property (class) int x; +@property (class, setter=customSet:) int customSetterProperty; +@property (class, getter=customGet) int customGetterProperty; @end @implementation A // expected-warning {{class property 'c2' requires method 'c2' to be defined}} \ @@ -29,6 +31,8 @@ @dynamic (class) x; // refers to the class property @synthesize z, c2; // expected-error {{@synthesize not allowed on a class property 'c2'}} @dynamic c; // refers to the class property +@dynamic customSetterProperty; +@dynamic customGetterProperty; @end int test() { @@ -37,6 +41,11 @@ int test() { return a.x + A.c; } +void customSelectors() { + A.customSetterProperty = 1; + (void)A.customGetterProperty; +} + void message_id(id me) { [me y]; } |