23 lines · plain
1// RUN: %clang_cc1 -fsyntax-only -verify -Wselector-type-mismatch %s2 3__attribute__((objc_root_class))4@interface Foo5@property() int dynamic_property;6@property(direct) int direct_property; // expected-note {{previous declaration is here}}7@end8 9@implementation Foo10@dynamic dynamic_property;11@dynamic direct_property; // expected-error {{direct property cannot be @dynamic}}12@end13 14@interface Foo (Bar)15@property() int dynamic_category_property;16@property(direct) int direct_category_property; // expected-note {{previous declaration is here}}17@end18 19@implementation Foo (Bar)20@dynamic dynamic_category_property;21@dynamic direct_category_property; // expected-error {{direct property cannot be @dynamic}}22@end23