[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / SemaObjCXX / property-type-mismatch.mm
blobc493d9941124337dc217a8566b88fb74ef0e1d4d
1 // RUN: %clang_cc1 -fsyntax-only -verify %s
2 // expected-no-diagnostics
4 @protocol P1;
6 @interface NSObject
7 @end
9 @interface A : NSObject
10 @property (assign) NSObject<P1> *prop;
11 @end
13 @protocol P2 <P1>
14 @end
16 @interface B : A
17 @property (assign) NSObject<P2> *prop;
18 @end
20 @interface C<T> : NSObject 
21 @end
23 @interface D
24 @property (nonatomic,readonly,nonnull) C<D *> *property;
25 @end
27 @interface D ()
28 @property (nonatomic, setter=_setProperty:) C *property; // okay
29 @end