blob: f463aae629108f12c846bb4ae7dbc61a49ccfa58 [file] [log] [blame]
Daniel Dunbard7d5f022009-03-24 02:24:46 +00001// RUN: clang-cc -verify %s
Fariborz Jahanian57c99342008-05-02 21:09:40 +00002
3@protocol P1 @end
4@protocol P2 @end
5@protocol P3 @end
6
7@interface NSData @end
8
9@interface MutableNSData : NSData @end
10
11@interface Base : NSData <P1>
12@property(readonly) id ref;
13@property(readonly) Base *p_base;
14@property(readonly) NSData *nsdata;
15@property(readonly) NSData * m_nsdata;
16@end
17
18@interface Data : Base <P1, P2>
Steve Naroff184671b2009-03-03 15:49:23 +000019@property(readonly) NSData *ref;
20@property(readonly) Data *p_base;
21@property(readonly) MutableNSData * m_nsdata;
Fariborz Jahanian57c99342008-05-02 21:09:40 +000022@end
23
24@interface MutedData: Data
Steve Naroff184671b2009-03-03 15:49:23 +000025@property(readonly) id p_base;
Fariborz Jahanian57c99342008-05-02 21:09:40 +000026@end
27
28@interface ConstData : Data <P1, P2, P3>
Steve Naroff184671b2009-03-03 15:49:23 +000029@property(readonly) ConstData *p_base;
Fariborz Jahanian57c99342008-05-02 21:09:40 +000030@end
31
Daniel Dunbar394d33f2008-08-26 07:16:44 +000032void foo(Base *b, id x) {
33 [ b setRef: x ]; // expected-warning {{method '-setRef:' not found}}
34}