1 // RUN: %clang_cc1 -fsyntax-only -verify %s
2 // expected-no-diagnostics
6 typedef struct objc_class *Class;
7 typedef struct objc_object {
10 id objc_getClass(const char *s);
18 - (void) instance_func0;
21 @interface Derived: Object <Func>
24 @interface Derived2: Object <Func>
27 static void doSomething(Class <Func> unsupportedObjectType) {
28 [unsupportedObjectType class_func0];
31 static void doSomethingElse(id <Func> pleaseConvertToThisType) {
32 [pleaseConvertToThisType class_func0];
35 int main(int argv, char *argc[]) {
36 doSomething([Derived self]);
37 doSomething([Derived2 self]);
38 doSomethingElse([Derived self]);
39 doSomethingElse([Derived2 self]);