1 // RUN: %clang_cc1 -fsyntax-only -verify %s
6 @interface TopClassWithClassProperty0
7 @property(nullable, readonly, strong, class) MyObject *foo;
10 @interface SubClassWithClassProperty0 : TopClassWithClassProperty0
11 @property(nonnull, readonly, copy, class) MyObject *foo; // expected-warning {{'copy' attribute on property 'foo' does not match the property inherited from 'TopClassWithClassProperty0'}}
16 @interface TopClassWithInstanceProperty1
17 @property(nullable, readonly, strong) MyObject *foo;
20 @interface ClassWithClassProperty1 : TopClassWithInstanceProperty1
21 @property(nonnull, readonly, copy, class) MyObject *foo; // no-warning
24 @interface SubClassWithInstanceProperty1 : ClassWithClassProperty1
25 @property(nullable, readonly, copy) MyObject *foo; // expected-warning {{'copy' attribute on property 'foo' does not match the property inherited from 'TopClassWithInstanceProperty1'}}
29 @interface TopClassWithClassProperty2
30 @property(nullable, readonly, strong, class) MyObject *foo;
33 @interface ClassWithInstanceProperty2 : TopClassWithClassProperty2
34 @property(nonnull, readonly, copy) MyObject *foo; // no-warning
37 @interface SubClassWithClassProperty2 : ClassWithInstanceProperty2
38 @property(nonnull, readonly, copy, class) MyObject *foo; // expected-warning {{'copy' attribute on property 'foo' does not match the property inherited from 'TopClassWithClassProperty2'}}