blob: 93f28e69f945e05c1f5f0faa39230bd98f8f5a68 [file] [log] [blame]
// RUN: clang-cc -fsyntax-only -verify %s
@protocol P
- (id) inst_in_proto;
@end
@interface Object <P>
- (id) inst_in_root;
@end
@interface Base
@end
@interface Derived: Base
- (id)starboard;
@end
void foo(void) {
Class receiver;
[Derived starboard]; // expected-warning {{method '+starboard' not found}}
[receiver starboard]; // expected-warning {{instance method 'starboard' is being used on 'Class'}}
[receiver inst_in_root]; // Ok!
[receiver inst_in_proto]; // Ok!
}