clang/test/SemaObjC/overriding-property-in-class-extension.m
raw| 1 | // RUN: %clang_cc1 -fsyntax-only -verify -Weverything %s |
| 2 | // expected-no-diagnostics |
| 3 | |
| 4 | @class NSString; |
| 5 | |
| 6 | @interface NSObject @end |
| 7 | |
| 8 | @interface MyClass : NSObject |
| 9 | |
| 10 | @property (nonatomic, copy, readonly) NSString* name; |
| 11 | |
| 12 | @end |
| 13 | |
| 14 | @interface MyClass () { |
| 15 | NSString* _name; |
| 16 | } |
| 17 | |
| 18 | @property (nonatomic, copy) NSString* name; |
| 19 | |
| 20 | @end |
| 21 | |
| 22 | @implementation MyClass |
| 23 | |
| 24 | @synthesize name = _name; |
| 25 | |
| 26 | @end |