28 lines · plain
1// RUN: %clang_cc1 -fsyntax-only -verify %s2 3@protocol P4- (id) inst_in_proto;5@end6 7@interface Object <P>8- (id) inst_in_root;9@end10 11@interface Base12@end13 14@interface Derived: Base15- (id)starboard;16@end17 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 28