| 1 |
// RUN: %clang_cc1 -fsyntax-only -verify -Wselector-type-mismatch %s |
| 2 |
|
| 3 |
__attribute__((objc_root_class)) |
| 4 |
@interface Foo |
| 5 |
@property() int dynamic_property; |
| 6 |
@property(direct) int direct_property; // expected-note {{previous declaration is here}} |
| 7 |
@end |
| 8 |
|
| 9 |
@implementation Foo |
| 10 |
@dynamic dynamic_property; |
| 11 |
@dynamic direct_property; // expected-error {{direct property cannot be @dynamic}} |
| 12 |
@end |
| 13 |
|
| 14 |
@interface Foo (Bar) |
| 15 |
@property() int dynamic_category_property; |
| 16 |
@property(direct) int direct_category_property; // expected-note {{previous declaration is here}} |
| 17 |
@end |
| 18 |
|
| 19 |
@implementation Foo (Bar) |
| 20 |
@dynamic dynamic_category_property; |
| 21 |
@dynamic direct_category_property; // expected-error {{direct property cannot be @dynamic}} |
| 22 |
@end |