blob: 8980d3709e470141695daa516f03967f93b5f207 [file] [log] [blame]
Fariborz Jahanian1147c5e2009-12-14 17:36:25 +00001// RUN: clang -cc1 -fsyntax-only -verify %s
Fariborz Jahanian041f2fd2009-05-05 18:34:37 +00002
3@protocol P
4- (id) inst_in_proto;
5@end
6
7@interface Object <P>
8- (id) inst_in_root;
9@end
10
11@interface Base
12@end
13
14@interface Derived: Base
15- (id)starboard;
16@end
17
18void foo(void) {
19 Class receiver;
20
21 [Derived starboard]; // expected-warning {{method '+starboard' not found}}
22
23 [receiver starboard]; // expected-warning {{instance method 'starboard' is being used on 'Class'}}
24 [receiver inst_in_root]; // Ok!
25 [receiver inst_in_proto]; // Ok!
26}
27