40 lines · plain
1// RUN: %clang_cc1 -fsyntax-only -verify %s2 3@class MyObject;4 5 6@interface TopClassWithClassProperty07@property(nullable, readonly, strong, class) MyObject *foo;8@end9 10@interface SubClassWithClassProperty0 : TopClassWithClassProperty011@property(nonnull, readonly, copy, class) MyObject *foo; // expected-warning {{'copy' attribute on property 'foo' does not match the property inherited from 'TopClassWithClassProperty0'}}12@end13 14 15 16@interface TopClassWithInstanceProperty117@property(nullable, readonly, strong) MyObject *foo;18@end19 20@interface ClassWithClassProperty1 : TopClassWithInstanceProperty121@property(nonnull, readonly, copy, class) MyObject *foo; // no-warning22@end23 24@interface SubClassWithInstanceProperty1 : ClassWithClassProperty125@property(nullable, readonly, copy) MyObject *foo; // expected-warning {{'copy' attribute on property 'foo' does not match the property inherited from 'TopClassWithInstanceProperty1'}}26@end27 28 29@interface TopClassWithClassProperty230@property(nullable, readonly, strong, class) MyObject *foo;31@end32 33@interface ClassWithInstanceProperty2 : TopClassWithClassProperty234@property(nonnull, readonly, copy) MyObject *foo; // no-warning35@end36 37@interface SubClassWithClassProperty2 : ClassWithInstanceProperty238@property(nonnull, readonly, copy, class) MyObject *foo; // expected-warning {{'copy' attribute on property 'foo' does not match the property inherited from 'TopClassWithClassProperty2'}}39@end40